@Test(expected = GlossaryViewOmasException.class) public void getRelatedTerms_throwExceptionWithParameterName() throws Exception{ response.setRelatedHTTPCode(501); response.setActionDescription("Action description"); response.setExceptionSystemAction("Exception system action"); response.setExceptionErrorMessage("Exception error message"); response.setExceptionUserAction("Exception user action"); response.setExceptionClassName(GlossaryViewOmasException.class.getName()); Map<String, Object> exceptionProperties = new HashMap<>(); exceptionProperties.put("parameterName", "CocoPharm"); response.setExceptionProperties(exceptionProperties); when(connector.callGetRESTCall(eq("getRelatedTerms"), eq(GlossaryViewEntityDetailResponse.class), anyString(), eq(SERVER_NAME), eq(USER_ID),eq(terms.get(0).getGuid()), isNull(), isNull())).thenReturn(response); underTest.getRelatedTerms(USER_ID, terms.get(0).getGuid(), null, null); }
public List<GlossaryTerm> getRelatedTerms(String userId, String termGUID, Integer from, Integer size) throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getRelatedTerms", GET_RELATED_TERMS, serverName, userId, termGUID, from, size); return castOmasResult(response.getResult()); }
GlossaryViewClient extends OmasClient { public List<GlossaryTerm> getRelatedTerms(String userId, String termGUID, Integer from, Integer size) throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getRelatedTerms", GET_RELATED_TERMS, serverName, userId, termGUID, from, size); return castOmasResult(response.getResult()); } }
GlossaryViewClient extends OmasClient { public List<GlossaryTerm> getRelatedTerms(String userId, String termGUID, Integer from, Integer size) throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getRelatedTerms", GET_RELATED_TERMS, serverName, userId, termGUID, from, size); return castOmasResult(response.getResult()); } GlossaryViewClient(String serverName, String serverPlatformRootURL);  GlossaryViewClient(String serverName, String serverPlatformRootURL, String userId, String password); }
GlossaryViewClient extends OmasClient { public List<GlossaryTerm> getRelatedTerms(String userId, String termGUID, Integer from, Integer size) throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getRelatedTerms", GET_RELATED_TERMS, serverName, userId, termGUID, from, size); return castOmasResult(response.getResult()); } GlossaryViewClient(String serverName, String serverPlatformRootURL);  GlossaryViewClient(String serverName, String serverPlatformRootURL, String userId, String password); List<Glossary> getAllGlossaries(String userId, Integer from, Integer size); List<GlossaryTerm> getAllGlossaryTerms(String userId, Integer from, Integer size); List<GlossaryCategory> getAllCategories(String userId, Integer from, Integer size); Glossary getGlossary(String userId, String glossaryGUID); Glossary getTermHomeGlossary(String userId, String termGUID); Glossary getCategoryHomeGlossary(String userId, String categoryGUID); List<ExternalGlossaryLink> getExternalGlossaryLinksOfGlossary(String userId, String glossaryGUID, Integer from, Integer size); GlossaryCategory getCategory(String userId, String categoryGUID); List<GlossaryCategory> getCategories(String userId, String glossaryGUID, Integer from, Integer size); List<GlossaryCategory> getSubcategories(String userId, String categoryGUID, Integer from, Integer size); List<ExternalGlossaryLink> getExternalGlossaryLinksOfCategory(String userId, String categoryGUID, Integer from, Integer size); GlossaryTerm getTerm(String userId, String termGUID); List<GlossaryTerm> getTermsOfGlossary(String userId, String glossaryGUID, Integer from, Integer size); List<GlossaryTerm> getTermsOfCategory(String userId, String categoryGUID, Integer from, Integer size); List<ExternalGlossaryLink> getExternalGlossaryLinksOfTerm(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getRelatedTerms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getSynonyms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getAntonyms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getPreferredTerms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getReplacementTerms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getTranslations(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getIsA(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getValidValues(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getUsedInContexts(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getAssignedElements(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getAttributes(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getSubtypes(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getTypes(String userId, String termGUID, Integer from, Integer size); }
GlossaryViewClient extends OmasClient { public List<GlossaryTerm> getRelatedTerms(String userId, String termGUID, Integer from, Integer size) throws PropertyServerException, InvalidParameterException, GlossaryViewOmasException { GlossaryViewEntityDetailResponse response = getMultipleRelatedEntitiesPagedResponse("getRelatedTerms", GET_RELATED_TERMS, serverName, userId, termGUID, from, size); return castOmasResult(response.getResult()); } GlossaryViewClient(String serverName, String serverPlatformRootURL);  GlossaryViewClient(String serverName, String serverPlatformRootURL, String userId, String password); List<Glossary> getAllGlossaries(String userId, Integer from, Integer size); List<GlossaryTerm> getAllGlossaryTerms(String userId, Integer from, Integer size); List<GlossaryCategory> getAllCategories(String userId, Integer from, Integer size); Glossary getGlossary(String userId, String glossaryGUID); Glossary getTermHomeGlossary(String userId, String termGUID); Glossary getCategoryHomeGlossary(String userId, String categoryGUID); List<ExternalGlossaryLink> getExternalGlossaryLinksOfGlossary(String userId, String glossaryGUID, Integer from, Integer size); GlossaryCategory getCategory(String userId, String categoryGUID); List<GlossaryCategory> getCategories(String userId, String glossaryGUID, Integer from, Integer size); List<GlossaryCategory> getSubcategories(String userId, String categoryGUID, Integer from, Integer size); List<ExternalGlossaryLink> getExternalGlossaryLinksOfCategory(String userId, String categoryGUID, Integer from, Integer size); GlossaryTerm getTerm(String userId, String termGUID); List<GlossaryTerm> getTermsOfGlossary(String userId, String glossaryGUID, Integer from, Integer size); List<GlossaryTerm> getTermsOfCategory(String userId, String categoryGUID, Integer from, Integer size); List<ExternalGlossaryLink> getExternalGlossaryLinksOfTerm(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getRelatedTerms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getSynonyms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getAntonyms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getPreferredTerms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getReplacementTerms(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getTranslations(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getIsA(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getValidValues(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getUsedInContexts(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getAssignedElements(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getAttributes(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getSubtypes(String userId, String termGUID, Integer from, Integer size); List<GlossaryTerm> getTypes(String userId, String termGUID, Integer from, Integer size);  }