/** * @param criteria query string that should be searched for * @param registry the governance registry instance * @param mediaType media type to be matched for search. Media type can be specified in the query string too * @return The list of artifacts. null if the media type and string is empty. * @throws GovernanceException thrown when an error occurs */ public static List<GovernanceArtifact> findGovernanceArtifacts(String criteria, Registry registry, String mediaType) throws GovernanceException { return findGovernanceArtifacts(criteria, registry, mediaType, false); }
/** * Removes the given endpoint artifact from the registry. * * @param endpointId the identifier of the endpoint artifact. * * @throws GovernanceException if the operation failed. */ public void removeEndpoint(String endpointId) throws GovernanceException { GovernanceUtils.removeArtifact(registry, endpointId); }
/** * Finds all the service path and used to list services * * @return all the service paths * @throws GovernanceException if the operation failed */ public String[] getAllServicePaths() throws GovernanceException { return GovernanceUtils.getResultPaths(registry, GovernanceConstants.SERVICE_MEDIA_TYPE); }
private void populateRXTPaths(String elementString){ GovernanceArtifactConfiguration artifactConfiguration = GovernanceUtils.getGovernanceArtifactConfiguration(elementString); CommonUtil.addStoragePath(artifactConfiguration.getMediaType(),artifactConfiguration.getPathExpression()); }
/** * update the path after moving the resource. * * @throws GovernanceException if an error occurred. */ public void updatePath() throws GovernanceException { path = GovernanceUtils.getArtifactPath(registry, id); }
/** * * @param key short name of the artifact type. * @param contextName context name of which lifecycle is needed * @param registry registry instance * @return lifecycle of the name associated with the context, null otherwise * @throws RegistryException if the operation failed */ public static String getLifeCycleOfContext(String key, String contextName, Registry registry) throws RegistryException { GovernanceArtifactConfiguration configuration = findGovernanceArtifactConfiguration(key, registry); if(configuration != null) { return configuration.getLifeCycleOfContext(contextName); } return null ; }
public static List<String> getUniqueAttributesNames(Registry registry, String mediaType) throws GovernanceException { try { GovernanceArtifactConfiguration configuration = findGovernanceArtifactConfigurationByMediaType(mediaType, registry); if (configuration != null) { return configuration.getUniqueAttributes(); } } catch (RegistryException e) { throw new GovernanceException(e); } return null; }
/** * Fetches the given artifact on the registry. * * @param artifactId the identifier of the artifact. * * @return the artifact. * @throws GovernanceException if the operation failed. */ public GovernanceArtifact getGovernanceArtifact(String artifactId) throws GovernanceException { return GovernanceUtils.retrieveGovernanceArtifactById(registry, artifactId); }
/** * Returns the parameterized end point reference * * @param context - the request context * @return the parameterized end point reference */ private String getEPR(RequestContext context) { // Getting the necessary values from the request context String finalEPR = ""; finalEPR = GovernanceUtils.parameterizeString(context, EPR); return finalEPR; }
/** * Method to set the expression that can be used to compute where to store the artifact. * * @param pathExpression the expression that can be used to compute where to store the artifact. */ public void setPathExpression(String pathExpression) { this.pathExpression = pathExpression; setUniqueAttributes(); }
/** * Method to obtain the list of keys that will be used to generate the artifact list UI. * * @return the list of keys that will be used to generate the artifact list UI. */ public String[] getKeysOnListUI() { String[] keysOnListUI = new String[listConfigurations.length]; for (int i = 0; i < listConfigurations.length; i++) { keysOnListUI[i] = listConfigurations[i].getKey(); } return keysOnListUI; }
/** * Method to obtain the list of names that will be displayed on the artifact list UI. * * @return the list of names that will be displayed on the artifact list UI. */ public String[] getNamesOnListUI() { String[] namesOnListUI = new String[listConfigurations.length]; for (int i = 0; i < listConfigurations.length; i++) { namesOnListUI[i] = listConfigurations[i].getName(); } return namesOnListUI; }
/** * Method to obtain the list of types that will be used to populate the content on the artifact * list UI. * * @return the list of types that will be used to populate the content on the artifact list UI. */ public String[] getTypesOnListUI() { String[] typesOnListUI = new String[listConfigurations.length]; for (int i = 0; i < listConfigurations.length; i++) { typesOnListUI[i] = listConfigurations[i].getType(); } return typesOnListUI; }
/** * Method to obtain the list of expressions that will be used to populate the content on the * artifact list UI. * * @return the list of expressions that will be used to populate the content on the artifact * list UI. */ public String[] getExpressionsOnListUI() { String[] expressionsOnListUI = new String[listConfigurations.length]; for (int i = 0; i < listConfigurations.length; i++) { expressionsOnListUI[i] = listConfigurations[i].getExpression(); } return expressionsOnListUI; }
/** * update the path after moving the resource. * * @param artifactId id of the artifact * @throws GovernanceException if an error occurred. */ public void updatePath(String artifactId) throws GovernanceException { path = GovernanceUtils.getArtifactPath(registry, artifactId); }
/** * Removes the given schema artifact from the registry. * * @param schemaId the identifier of the schema artifact. * * @throws GovernanceException if the operation failed. */ public void removeSchema(String schemaId) throws GovernanceException { GovernanceUtils.removeArtifact(registry, schemaId); }
/** * Returns the path of the artifact, need to save the artifact before * getting the path. * * @return here we return the path of the artifact. * @throws GovernanceException if an error occurred. */ @Override public String getPath() throws GovernanceException { if (path == null) { path = GovernanceUtils.getArtifactPath(registry, id); } return path; }
/** * Removes the given policy artifact from the registry. * * @param policyId the identifier of the policy artifact. * * @throws GovernanceException if the operation failed. */ public void removePolicy(String policyId) throws GovernanceException { GovernanceUtils.removeArtifact(registry, policyId); }
/** * Removes the given artifact from the registry. * * @param artifactId the identifier of the artifact. * * @throws GovernanceException if the operation failed. */ public void removeGovernanceArtifact(String artifactId) throws GovernanceException { GovernanceUtils.removeArtifact(registry, artifactId); }
/** * Removes the given WSDL artifact from the registry. * * @param wsdlId the identifier of the WSDL artifact. * * @throws GovernanceException if the operation failed. */ public void removeWsdl(String wsdlId) throws GovernanceException { GovernanceUtils.removeArtifact(registry, wsdlId); }