Skip to content

Commit

Permalink
Data Manager Server-side
Browse files Browse the repository at this point in the history
Signed-off-by: Mandy Chessell <mandy_chessell@uk.ibm.com>
  • Loading branch information
mandy-chessell committed Jul 13, 2021
1 parent 35baec9 commit f4b9135
Show file tree
Hide file tree
Showing 39 changed files with 9,958 additions and 834 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ APIOperationElement getAPIOperationByGUID(String userId,
* @param apiManagerName unique name of software server capability representing the caller
* @param apiManagerIsHome should the API operation be marked as owned by the API manager so others can not update?
* @param apiOperationGUID unique identifier of an APIOperation
* @param parameterListType is this a header, request or response
* @param properties properties about the API parameter list
*
* @return unique identifier of the new API parameter list
Expand Down Expand Up @@ -479,6 +480,7 @@ String createAPIParameterList(String userId,
* @param apiManagerIsHome should the API operation be marked as owned by the API manager so others can not update?
* @param templateGUID unique identifier of the metadata element to copy
* @param apiOperationGUID unique identifier of the API where the API Operation is located
* @param parameterListType is this a header, request or response
* @param templateProperties properties that override the template
*
* @return unique identifier of the new API Parameter List
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ String createDataContainer(String userId,
* @param applicationGUID unique identifier of software server capability representing the caller
* @param applicationName unique name of software server capability representing the caller
* @param applicationIsHome should the query be marked as owned by the event broker so others can not update?
* @param parentElementGUID element to link the data container to
* @param templateGUID unique identifier of the metadata element to copy
* @param templateProperties properties that override the template
*
Expand All @@ -740,6 +741,7 @@ String createDataContainerFromTemplate(String userId,
String applicationGUID,
String applicationName,
boolean applicationIsHome,
String parentElementGUID,
String templateGUID,
TemplateProperties templateProperties) throws InvalidParameterException,
UserNotAuthorizedException,
Expand Down Expand Up @@ -809,31 +811,35 @@ void removeDataContainer(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)
*/
List<DataContainerElement> findDataContainer(String userId,
String searchString,
String typeName,
int startFrom,
int pageSize) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
List<DataContainerElement> findDataContainers(String userId,
String searchString,
String typeName,
int startFrom,
int pageSize) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Return the data container associated with a specific open metadata element (data asset, process or port).
*
* @param userId calling user
* @param parentElementGUID unique identifier of the open metadata element that this data container is connected to
* @param startFrom paging start point
* @param pageSize maximum results that can be returned
*
* @return metadata element describing the data container associated with the requested parent 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)
*/
DataContainerElement getDataContainerForElement(String userId,
String parentElementGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
List<DataContainerElement> getDataContainersForElement(String userId,
String parentElementGUID,
int startFrom,
int pageSize) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
Expand Down Expand Up @@ -957,6 +963,30 @@ String createDataFieldFromTemplate(String userId,
PropertyServerException;


/**
* Connect a schema type to a data field.
*
* @param userId calling user
* @param applicationGUID unique identifier of software server capability representing the event broker
* @param applicationName unique name of software server capability representing the event broker
* @param applicationIsHome should the data field be marked as owned by the event broker so others can not update?
* @param relationshipTypeName name of relationship to create
* @param apiParameterGUID unique identifier of the API parameter
* @param schemaTypeGUID unique identifier of the schema type to connect
*
* @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)
*/
void setupSchemaType(String userId,
String applicationGUID,
String applicationName,
boolean applicationIsHome,
String relationshipTypeName,
String apiParameterGUID,
String schemaTypeGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;

/**
* Update the metadata element representing an data field.
Expand Down Expand Up @@ -989,7 +1019,6 @@ void updateDataField(String userId,
* @param applicationGUID unique identifier of software server capability representing the caller
* @param applicationName unique name of software server capability representing the caller
* @param dataFieldGUID unique identifier of the metadata element to remove
* @param qualifiedName unique name of the metadata element to remove
*
* @throws InvalidParameterException one of the parameters is invalid
* @throws UserNotAuthorizedException the user is not authorized to issue this request
Expand All @@ -998,8 +1027,7 @@ void updateDataField(String userId,
void removeDataField(String userId,
String applicationGUID,
String applicationName,
String dataFieldGUID,
String qualifiedName) throws InvalidParameterException,
String dataFieldGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ public DataFieldElement(DataFieldElement template)
}


/**
* Copy/clone constructor
*
* @param template object to copy
*/
public DataFieldElement(SchemaAttributeElement template)
{
if (template != null)
{
elementHeader = template.getElementHeader();
properties = new DataFieldProperties(template.getProperties());
}
}


/**
* Return the element header associated with the properties.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ public DataFieldProperties(DataFieldProperties template)
}


/**
* Copy/clone Constructor.
*
* @param template template object to copy.
*/
public DataFieldProperties(SchemaAttributeProperties template)
{
super(template);
}


/**
* Standard toString method.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,10 @@ public void removeAPI(String userId,
PropertyServerException
{
final String methodName = "removeAPI";
final String apiManagerGUIDParameterName = "apiManagerGUID";
final String apiManagerNameParameterName = "apiManagerName";
final String elementGUIDParameterName = "apiGUID";
final String qualifiedNameParameterName = "qualifiedName";

invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(apiManagerGUID, apiManagerGUIDParameterName, methodName);
invalidParameterHandler.validateName(apiManagerName, apiManagerNameParameterName, methodName);
invalidParameterHandler.validateGUID(apiGUID, elementGUIDParameterName, methodName);
invalidParameterHandler.validateName(qualifiedName, qualifiedNameParameterName, methodName);

Expand Down Expand Up @@ -974,7 +970,7 @@ public APIOperationElement getAPIOperationByGUID(String userId,
* @param apiManagerName unique name of software server capability representing the caller
* @param apiManagerIsHome should the API operation be marked as owned by the API manager so others can not update?
* @param apiOperationGUID unique identifier of an APIOperation
* @param parameterListType is this is a header, request of response
* @param parameterListType is this a header, request or response
* @param properties properties about the API parameter list
*
* @return unique identifier of the new API parameter list
Expand Down Expand Up @@ -1035,7 +1031,7 @@ public String createAPIParameterList(String userId,
* @param apiManagerIsHome should the API operation be marked as owned by the API manager so others can not update?
* @param templateGUID unique identifier of the metadata element to copy
* @param apiOperationGUID unique identifier of the API Operation where the API Parameter List is located
* @param parameterListType is this is a header, request of response
* @param parameterListType is this a header, request or response
* @param templateProperties properties that override the template
*
* @return unique identifier of the new API Parameter List
Expand Down Expand Up @@ -1445,7 +1441,7 @@ public String createAPIParameterFromTemplate(String userId,


/**
* Connect a schema type to a API parameter.
* Connect a schema type to an API parameter.
*
* @param userId calling user
* @param apiManagerGUID unique identifier of software server capability representing the caller
Expand Down Expand Up @@ -1475,7 +1471,7 @@ public void setupSchemaType(String userId,
}
else
{
super.setupSchemaType(userId, apiManagerGUID, apiManagerName, relationshipTypeName, apiParameterGUID, schemaTypeGUID);
super.setupSchemaType(userId, null, null, relationshipTypeName, apiParameterGUID, schemaTypeGUID);
}
}

Expand Down Expand Up @@ -1594,6 +1590,7 @@ private List<APIParameterElement> getAPIParametersFomSchemaAttributes(List<Schem
return apiParameterElements;
}
}

return null;
}

Expand Down
Loading

0 comments on commit f4b9135

Please sign in to comment.