public class ResourceRestUtils extends BaseRestUtils
acceptHeaderData, acceptJsonHeader, acceptOctetHeader, acceptOctetStream, authorizationHeader, authorizationPrefixString, contentTypeHeaderData, ecomp, PRODUCT_COMPONENT_TYPE, RESOURCE_COMPONENT_TYPE, RESTRICTED_OPERATION, SERVICE_COMPONENT_TYPE, STATUS_CODE_ALREADY_EXISTS, STATUS_CODE_COMPONENT_NAME_EXCEEDS_LIMIT, STATUS_CODE_CREATED, STATUS_CODE_DELETE, STATUS_CODE_GET_SUCCESS, STATUS_CODE_IMPORT_SUCCESS, STATUS_CODE_INVALID_CONTENT, STATUS_CODE_MISSING_COMPONENT_NAME, STATUS_CODE_MISSING_DATA, STATUS_CODE_MISSING_INFORMATION, STATUS_CODE_NOT_FOUND, STATUS_CODE_RESTRICTED_ACCESS, STATUS_CODE_RESTRICTED_OPERATION, STATUS_CODE_SUCCESS, STATUS_CODE_SUCCESS_DELETE, STATUS_CODE_SUCCESS_NO_CONTENT, STATUS_CODE_UNSUPPORTED_ERROR, STATUS_CODE_UPDATE_SUCCESS, SUCCESS_MESSAGE
Constructor and Description |
---|
ResourceRestUtils() |
addAuthorizeHeader, encodeUrlForDownload, prepareHeadersMap, prepareHeadersMap, sendDelete, sendGet, sendGet, sendGetAndRemoveHeaders, sendPost, sendPost, sendPost, sendPut
checkCreateResponse, checkDeleteResponse, checkErrorCode, checkErrorMessageResponse, checkErrorResponse, checkStatusCode, checkSuccess
public static RestResponse createResource(ResourceReqDetails resourceDetails, User sdncModifierDetails) throws Exception
Exception
public static RestResponse createImportResource(ImportReqDetails importReqDetails, User sdncModifierDetails, Map<String,String> additionalHeaders) throws org.json.JSONException, IOException
org.json.JSONException
IOException
public static RestResponse deleteResource(ResourceReqDetails resourceDetails, User sdncModifierDetails, String version) throws IOException
IOException
public static RestResponse markResourceToDelete(String resourceId, String userId) throws IOException
IOException
public static RestResponse deleteResource(String resourceId, String userId) throws IOException
IOException
public static void deleteMarkedResources(String userId) throws IOException
IOException
public static RestResponse deleteResourceByNameAndVersion(User sdncModifierDetails, String resourceName, String resourceVersion) throws IOException
IOException
public static Boolean deleteResourceByNameAndVersion(String resourceName, String resourceVersion) throws IOException
IOException
public static Boolean removeResource(String resourceId) throws FileNotFoundException, IOException, org.apache.http.client.ClientProtocolException
FileNotFoundException
IOException
org.apache.http.client.ClientProtocolException
public static RestResponse getResource(User sdncModifierDetails, String uniqueId) throws IOException
IOException
public static RestResponse getModule(User sdncModifierDetails, String componentId, String moduleId) throws IOException
IOException
public static RestResponse getLatestResourceFromCsarUuid(User sdncModifierDetails, String csarUuid) throws IOException
IOException
public static RestResponse getResource(ResourceReqDetails resourceDetails, User sdncModifierDetails) throws IOException
IOException
public static RestResponse getResourceByNameAndVersion(String userId, String resourceName, String resourceVersion) throws IOException
IOException
public static RestResponse getResourceList(User sdncModifierDetails) throws IOException
IOException
public static RestResponse getResource(String resourceId) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolException
IOException
public static RestResponse getLatestResourceFromCsarUuid(String csarUuid) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolException
IOException
public static RestResponse getResourceLatestVersionList(User sdncModifierDetails) throws IOException
IOException
public static RestResponse putAllCategoriesTowardsCatalogFeWithUuidNotAllowed(String uuid) throws IOException
IOException
public static RestResponse getAllTagsTowardsCatalogBe() throws IOException
IOException
public static RestResponse getAllPropertyScopesTowardsCatalogBe() throws IOException
IOException
public static RestResponse getAllArtifactTypesTowardsCatalogBe() throws IOException
IOException
public static RestResponse getConfigurationTowardsCatalogBe() throws IOException
IOException
public static RestResponse sendOptionsTowardsCatalogFeWithUuid() throws IOException
IOException
public static RestResponse updateResourceMetadata(ResourceReqDetails updatedResourceDetails, User sdncModifierDetails, String uniqueId, String encoding) throws Exception
Exception
public static RestResponse updateResourceTEST(Resource resource, User sdncModifierDetails, String uniqueId, String encoding) throws Exception
Exception
public static RestResponse updateResourceMetadata(ResourceReqDetails updatedResourceDetails, User sdncModifierDetails, String uniqueId) throws Exception
Exception
public static RestResponse updateResourceMetadata(String json, User sdncModifierDetails, String resourceId) throws IOException
IOException
public static RestResponse updateResource(ResourceReqDetails resourceDetails, User sdncModifierDetails, String resourceId) throws IOException
IOException
public static RestResponse createResourceInstance(ResourceReqDetails resourceDetails, User modifier, String vfResourceUniqueId) throws Exception
Exception
public static RestResponse associateResourceInstances(org.json.simple.JSONObject body, User sdncModifierDetails, Component component) throws IOException
IOException
public static RestResponse getFollowedList(User sdncModifierDetails) throws Exception
Exception
public static List<Resource> restResponseToResourceObjectList(String restResponse)
public static Resource getResourceObjectFromResourceListByUid(List<Resource> resourceList, String uid)
public static RestResponse associate2ResourceInstances(Component container, ComponentInstance fromNode, ComponentInstance toNode, String assocType, User sdncUserDetails) throws IOException
IOException
public static RestResponse associate2ResourceInstances(Component component, String fromNode, String toNode, String assocType, User sdncUserDetails) throws IOException
IOException
public static String getRiUniqueIdByRiName(Component component, String resourceInstanceName)
public static Resource convertResourceGetResponseToJavaObject(ResourceReqDetails resourceDetails) throws IOException
IOException
public static RestResponse changeResourceInstanceVersion(String containerUniqueId, String instanceToReplaceUniqueId, String newResourceUniqueId, User sdncModifierDetails, ComponentTypeEnum componentType) throws IOException
IOException
Copyright © 2017. All rights reserved.