Skip to content

Commit

Permalink
Merge pull request #8130 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Add Collection Manager OMVS
  • Loading branch information
mandy-chessell authored Apr 3, 2024
2 parents 47e28c6 + 76bba98 commit 9774b6f
Show file tree
Hide file tree
Showing 75 changed files with 4,809 additions and 411 deletions.
2 changes: 1 addition & 1 deletion OpenConnectorsArchiveGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenConnectorsArchive.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenConnectorsArchive.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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-connector-framework')
implementation project(':open-metadata-implementation:frameworks:governance-action-framework')
implementation project(':open-metadata-implementation:repository-services:repository-services-apis')
implementation project(':open-metadata-implementation:common-services:ffdc-services')
implementation 'com.fasterxml.jackson.core:jackson-databind'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,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.governanceaction.search.ElementProperties;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* The CollectionsInterface adds methods for managing collections. Collections are managed lists of elements. They can be used to create a folder
Expand Down Expand Up @@ -152,8 +155,16 @@ CollectionElement getCollection(String userId,
* Create a new generic collection.
*
* @param userId userId of user making request.
* @param anchorGUID 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 isOwnAnchor boolean flag to day that the element should be classified as its own anchor once its element
* is created in the repository.
* @param optionalClassification classification of the collections - typically RootCollection, Set or Folder
* @param properties properties for the collection.
* @param parentGUID unique identifier of optional parent entity
* @param parentRelationshipTypeName type of relationship to connect the new element to the parent
* @param parentRelationshipProperties properties to include in parent relationship
* @param parentAtEnd1 which end should the parent GUID go in the relationship
*
* @return unique identifier of the newly created Collection
*
Expand All @@ -162,30 +173,58 @@ CollectionElement getCollection(String userId,
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
*/
String createCollection(String userId,
String anchorGUID,
boolean isOwnAnchor,
String optionalClassification,
CollectionProperties properties) throws InvalidParameterException,
PropertyServerException,
UserNotAuthorizedException;
CollectionProperties properties,
String parentGUID,
String parentRelationshipTypeName,
ElementProperties parentRelationshipProperties,
boolean parentAtEnd1) throws InvalidParameterException,
PropertyServerException,
UserNotAuthorizedException;



/**
* Create a new metadata element to represent a collection using an existing metadata element as a template.
* The template defines additional classifications and relationships that should be added to the new collection.
*
* @param userId calling user
* @param templateGUID unique identifier of the metadata element to copy
* @param templateProperties properties that override the template
* @param userId calling user
* @param anchorGUID 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 isOwnAnchor boolean flag to day that the element should be classified as its own anchor once its element
* is created in the repository.
* @param effectiveFrom the date when this element is active - null for active on creation
* @param effectiveTo the date when this element becomes inactive - null for active until deleted
* @param templateGUID the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema
* connection etc)
* @param replacementProperties properties of the new metadata element. These override the template values
* @param placeholderProperties property name-to-property value map to replace any placeholder values in the
* template element - and their anchored elements, which are also copied as part of this operation.
* @param parentGUID unique identifier of optional parent entity
* @param parentRelationshipTypeName type of relationship to connect the new element to the parent
* @param parentRelationshipProperties properties to include in parent relationship
* @param parentAtEnd1 which end should the parent GUID go in the relationship
*
* @return unique identifier of the new metadata element
*
* @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)
*/
String createCollectionFromTemplate(String userId,
String templateGUID,
TemplateProperties templateProperties) throws InvalidParameterException,
String createCollectionFromTemplate(String userId,
String anchorGUID,
boolean isOwnAnchor,
Date effectiveFrom,
Date effectiveTo,
String templateGUID,
ElementProperties replacementProperties,
Map<String, String> placeholderProperties,
String parentGUID,
String parentRelationshipTypeName,
ElementProperties parentRelationshipProperties,
boolean parentAtEnd1) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;

Expand All @@ -194,21 +233,33 @@ String createCollectionFromTemplate(String userId,
/**
* Create a new collection that represents a digital product.
*
* @param userId userId of user making request.
* @param digitalServiceGUID unique identifier of owning digital service (optional)
* @param collectionProperties properties for the collection.
* @param userId userId of user making request.
* @param anchorGUID 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 isOwnAnchor boolean flag to day that the element should be classified as its own anchor once its element
* is created in the repository.
* @param collectionProperties properties for the collection.
* @param digitalProductProperties properties for the attached DigitalProduct classification
* @param parentGUID unique identifier of optional parent entity
* @param parentRelationshipTypeName type of relationship to connect the new element to the parent
* @param parentRelationshipProperties properties to include in parent relationship
* @param parentAtEnd1 which end should the parent GUID go in the relationship
*
* @return unique identifier of the newly created Collection
*
* @throws InvalidParameterException one of the parameters is invalid.
* @throws PropertyServerException there is a problem retrieving information from the property server(s).
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.
* @throws InvalidParameterException one of the parameters is invalid.
* @throws PropertyServerException there is a problem retrieving information from the property server(s).
* @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.*
*/
String createDigitalProduct(String userId,
String digitalServiceGUID,
String anchorGUID,
boolean isOwnAnchor,
CollectionProperties collectionProperties,
DigitalProductProperties digitalProductProperties) throws InvalidParameterException,
DigitalProductProperties digitalProductProperties,
String parentGUID,
String parentRelationshipTypeName,
ElementProperties parentRelationshipProperties,
boolean parentAtEnd1) throws InvalidParameterException,
PropertyServerException,
UserNotAuthorizedException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class DigitalProductProperties extends ClassificationProperties
{
private String productName = null;
private String productType = null;
private String description = null;
private Date introductionDate = null;
private String maturity = null;
private String serviceLife = null;
private String currentVersion = null;
private Date nextVersion = null;
private Date withdrawDate = null;
private Map<String, String> additionalProperties = null;
private DigitalProductStatus productStatus = null;
private String productName = null;
private String productType = null;
private String description = null;
private Date introductionDate = null;
private String maturity = null;
private String serviceLife = null;
private String currentVersion = null;
private Date nextVersion = null;
private Date withdrawDate = null;
private Map<String, String> additionalProperties = null;


/**
Expand All @@ -55,6 +56,7 @@ public DigitalProductProperties(DigitalProductProperties template)

if (template != null)
{
productStatus = template.getProductStatus();
productName = template.getProductName();
productType = template.getProductType();
description = template.getDescription();
Expand All @@ -69,6 +71,28 @@ public DigitalProductProperties(DigitalProductProperties template)
}


/**
* Return the status of the product.
*
* @return InstanceStatus enum
*/
public DigitalProductStatus getProductStatus()
{
return productStatus;
}


/**
* Set up the status of the product
*
* @param productStatus InstanceStatus enum
*/
public void setProductStatus(DigitalProductStatus productStatus)
{
this.productStatus = productStatus;
}


/**
* Return the product name.
*
Expand Down Expand Up @@ -301,6 +325,7 @@ public String toString()
"effectiveFrom=" + getEffectiveFrom() +
", effectiveTo=" + getEffectiveTo() +
", extendedProperties=" + getExtendedProperties() +
", productStatus='" + productStatus + '\'' +
", productName='" + productName + '\'' +
", productType='" + productType + '\'' +
", description='" + description + '\'' +
Expand Down Expand Up @@ -328,16 +353,16 @@ public boolean equals(Object objectToCompare)
{
return true;
}
if (! (objectToCompare instanceof DigitalProductProperties))
if (! (objectToCompare instanceof DigitalProductProperties that))
{
return false;
}
if (! super.equals(objectToCompare))
{
return false;
}
DigitalProductProperties that = (DigitalProductProperties) objectToCompare;
return Objects.equals(productName, that.productName) &&
return Objects.equals(productStatus, that.productStatus) &&
Objects.equals(productName, that.productName) &&
Objects.equals(productType, that.productType) && Objects.equals(description, that.description) &&
Objects.equals(introductionDate, that.introductionDate) && Objects.equals(maturity, that.maturity) &&
Objects.equals(serviceLife, that.serviceLife) && Objects.equals(currentVersion, that.currentVersion) &&
Expand All @@ -354,7 +379,7 @@ public boolean equals(Object objectToCompare)
@Override
public int hashCode()
{
return Objects.hash(super.hashCode(), productName, productType, description, introductionDate, maturity, serviceLife, currentVersion,
nextVersion, withdrawDate, additionalProperties);
return Objects.hash(super.hashCode(), productStatus, productName, productType, description, introductionDate,
maturity, serviceLife, currentVersion, nextVersion, withdrawDate, additionalProperties);
}
}
Loading

0 comments on commit 9774b6f

Please sign in to comment.