Class GlossaryAuthorViewGlossaryClient
- java.lang.Object
-
- org.odpi.openmetadata.viewservices.glossaryauthor.fvt.client.glossarys.GlossaryAuthorViewGlossaryClient
-
- All Implemented Interfaces:
ResponseParameterization<Glossary>,GlossaryAuthorViewGlossary
public class GlossaryAuthorViewGlossaryClient extends Object implements GlossaryAuthorViewGlossary, ResponseParameterization<Glossary>
The class acts as a wrapper class for calling the REST services for Glossary Author Glossary related services.
-
-
Field Summary
Fields Modifier and Type Field Description protected GlossaryAuthorViewRestClientclient
-
Constructor Summary
Constructors Constructor Description GlossaryAuthorViewGlossaryClient(String serverName, String url)GlossaryAuthorViewGlossaryClient(GlossaryAuthorViewRestClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Glossarycreate(String userId, Glossary glossary)Create a Glossary.List<Term>createTerms(String userId, String guid, Term[] termArray)Create multiple terms within a glossaryvoiddelete(String userId, String guid)Delete a Glossary.List<Glossary>find(String userId, FindRequest findRequest)List<Glossary>find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase)List<Glossary>find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase, Integer maximumPageSizeOnRestCall)List<Relationship>getAllRelationships(String userId, String guid)Get a Glossary's relationshipsGlossarygetByGUID(String userId, String guid)Get a Glossary.List<Category>getCategories(String userId, String guid, FindRequest findRequest)Get the Categories owned by this glossary.List<Category>getCategories(String userId, String guid, FindRequest findRequest, boolean onlyTop)Get the Categories owned by this glossary.protected StringgetMethodInfo(String methodName)List<Term>getTerms(String userId, String guid, FindRequest findRequest)Extract terms within a glossaryList<Term>getTerms(String userId, String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase, Integer maximumPageSizeOnRestCall)Class<? extends GenericResponse>responseType()Glossaryrestore(String userId, String guid)Restore a soft-deleted Glossary.Glossaryupdate(String userId, String guid, Glossary glossary, boolean isReplace)Update a Glossary.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.odpi.openmetadata.commonservices.ffdc.rest.ResponseParameterization
getParameterizedType, resultType
-
-
-
-
Field Detail
-
client
protected final GlossaryAuthorViewRestClient client
-
-
Constructor Detail
-
GlossaryAuthorViewGlossaryClient
public GlossaryAuthorViewGlossaryClient(GlossaryAuthorViewRestClient client)
-
GlossaryAuthorViewGlossaryClient
public GlossaryAuthorViewGlossaryClient(String serverName, String url) throws InvalidParameterException
- Throws:
InvalidParameterException
-
-
Method Detail
-
find
public List<Glossary> find(String userId, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
-
find
public List<Glossary> find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
-
find
public List<Glossary> find(String userId, FindRequest findRequest, boolean exactValue, boolean ignoreCase, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
-
responseType
public Class<? extends GenericResponse> responseType()
- Specified by:
responseTypein interfaceResponseParameterization<Glossary>
-
create
public Glossary create(String userId, Glossary glossary) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGlossaryCreate a Glossary.The result is the Glossary object
- Specified by:
createin interfaceGlossaryAuthorViewGlossary- Parameters:
userId- userId under which the request is performedglossary- Glossary object to be created- Returns:
- The Glossary
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
update
public Glossary update(String userId, String guid, Glossary glossary, boolean isReplace) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGlossaryUpdate a Glossary.The result is the updated Glossary object
- Specified by:
updatein interfaceGlossaryAuthorViewGlossary- Parameters:
userId- userId under which the request is performedguid- guid of Glossary object to be updatedglossary- Glossary object with updated valuesisReplace- To replace existing Glossary or not- Returns:
- The updated Glossary
- Throws:
PropertyServerException- something went wrong with the REST call stack.InvalidParameterException- one of the parameters is null or invalidUserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getByGUID
public Glossary getByGUID(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGlossaryGet a Glossary.The result is the requested Glossary object
- Specified by:
getByGUIDin interfaceGlossaryAuthorViewGlossary- Parameters:
userId- userId under which the request is performedguid- guid of Glossary object to be retrieved- Returns:
- The requested Glossary
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
delete
public void delete(String userId, String guid) throws PropertyServerException
Description copied from interface:GlossaryAuthorViewGlossaryDelete a Glossary.The result Void object
- Specified by:
deletein interfaceGlossaryAuthorViewGlossary- Parameters:
userId- userId under which the request is performedguid- guid of Glossary object to be retrieved- Throws:
PropertyServerException- something went wrong with the REST call stack.
-
restore
public Glossary restore(String userId, String guid) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGlossaryRestore a soft-deleted Glossary.The result is the restored Glossary object
- Specified by:
restorein interfaceGlossaryAuthorViewGlossary- Parameters:
userId- userId under which the request is performedguid- guid of Glossary object to be restored- Returns:
- The restored Glossary
- Throws:
PropertyServerException- something went wrong with the REST call stack.InvalidParameterException- one of the parameters is null or invalidUserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getAllRelationships
public List<Relationship> getAllRelationships(String userId, String guid) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGlossaryGet a Glossary's relationshipsThe result is a list of Relationships
- Specified by:
getAllRelationshipsin interfaceGlossaryAuthorViewGlossary- Parameters:
userId- userId under which the request is performedguid- guid of Glossary object to be retrieved- Returns:
- The list of Glossary relationships
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getCategories
public List<Category> getCategories(String userId, String guid, FindRequest findRequest, boolean onlyTop) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGlossaryGet the Categories owned by this glossary.- Specified by:
getCategoriesin interfaceGlossaryAuthorViewGlossary- Parameters:
userId- unique identifier for requesting user, under which the request is performed.guid- unique identifier of the object to which the found objects should relate.findRequest- information object for find calls. This include pageSize to limit the number of elements returned.onlyTop- when only the top categories (those categories without parents) are returned.- Returns:
- list of Categories
- Throws:
InvalidParameterException- one of the parameters is null or invalid.PropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getCategories
public List<Category> getCategories(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGlossaryGet the Categories owned by this glossary.- Specified by:
getCategoriesin interfaceGlossaryAuthorViewGlossary- Parameters:
userId- unique identifier for requesting user, under which the request is performed.guid- unique identifier of the object to which the found objects should relate.findRequest- information object for find calls. This include pageSize to limit the number of elements returned.- Returns:
- list of Categories
- Throws:
InvalidParameterException- one of the parameters is null or invalid.PropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getTerms
public List<Term> getTerms(String userId, String guid, FindRequest findRequest) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGlossaryExtract terms within a glossary- Specified by:
getTermsin interfaceGlossaryAuthorViewGlossary- Parameters:
userId- calling userguid- glossary GUIDfindRequest- information object for find calls. This include pageSize to limit the number of elements returned.- Returns:
- list of terms
- Throws:
InvalidParameterException- one of the parameters is null or invalidPropertyServerException- something went wrong with the REST call stack.UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
createTerms
public List<Term> createTerms(String userId, String guid, Term[] termArray) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Description copied from interface:GlossaryAuthorViewGlossaryCreate multiple terms within a glossary- Specified by:
createTermsin interfaceGlossaryAuthorViewGlossary- Parameters:
userId- calling userguid- glossary GUIDtermArray- array of glossary objects that are to be created.- Returns:
- list of terms created
- Throws:
PropertyServerException- something went wrong with the REST call stack.InvalidParameterException- one of the parameters is null or invalidUserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
getTerms
public List<Term> getTerms(String userId, String guid, FindRequest findRequest, boolean exactValue, boolean ignoreCase, Integer maximumPageSizeOnRestCall) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
-
-