public class ArtifactRestUtils 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 |
---|
ArtifactRestUtils() |
addAuthorizeHeader, prepareHeadersMap, prepareHeadersMap, sendDelete, sendGet, sendGet, sendGetAndRemoveHeaders, sendPost, sendPost, sendPost, sendPut
checkCreateResponse, checkDeleteResponse, checkErrorCode, checkErrorMessageResponse, checkErrorResponse, checkStatusCode, checkSuccess
public static RestResponse externalAPIUploadArtifactOfTheAsset(Component component, User user, ArtifactReqDetails artifactReqDetails) throws IOException
IOException
public static RestResponse getResourceDeploymentArtifactExternalAPI(String resourceUUID, String artifactUUID, User sdncModifierDetails, String resourceType) throws IOException
IOException
public static RestResponse getComponentInstanceDeploymentArtifactExternalAPI(String resourceUUID, String componentInstanceUID, String artifactUUID, User sdncModifierDetails, String resourceType) throws IOException
IOException
public static RestResponse getArtifactTypesList() throws IOException
IOException
public static RestResponse addInformationalArtifactToService(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String serviceUid) throws IOException
IOException
public static RestResponse addInformationalArtifactToService(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String serviceUid, String checksum) throws IOException
IOException
public static RestResponse downloadServiceArtifact(ServiceReqDetails service, ArtifactReqDetails artifact, User user, Map<String,String> addionalHeaders) throws Exception
Exception
public static RestResponse downloadServiceArtifact(ServiceReqDetails service, ArtifactReqDetails artifact, User user, Map<String,String> addionalHeaders, boolean addEcompHeader) throws Exception
Exception
public static RestResponse downloadResourceArtifact(ServiceReqDetails service, ResourceReqDetails resource, ArtifactReqDetails artifact, User user, Map<String,String> addionalHeaders) throws Exception
Exception
public static RestResponse downloadResourceArtifact(ServiceReqDetails service, ResourceReqDetails resource, ArtifactReqDetails artifact, User user, Map<String,String> addionalHeaders, boolean addEcompHeader) throws Exception
Exception
public static RestResponse downloadResourceInstanceArtifact(String serviceUniqueId, String resourceInstanceId, User user, String artifactUniqeId) throws Exception
Exception
public static RestResponse updateInformationalArtifactOfServiceByMethod(ArtifactReqDetails artifactReqDetails, String serviceUid, String artifactUid, User sdncModifierDetails, String httpMethod) throws IOException
IOException
public static RestResponse updateInformationalArtifactOfServiceByMethod(ArtifactReqDetails artifactReqDetails, String serviceUid, User sdncModifierDetails, String httpMethod) throws IOException
IOException
public static RestResponse downloadResourceArtifactInternalApi(String resourceId, User user, String artifactUniqeId) throws Exception
Exception
public static RestResponse downloadServiceArtifactInternalApi(String componentId, User user, String artifactUniqeId) throws Exception
Exception
public static RestResponse downloadComponentArtifactInternalApi(String componentId, User user, String artifactUniqeId, String urlTemplate) throws Exception
Exception
public static RestResponse updateInformationalArtifactOfServiceByMethod(ArtifactReqDetails artifactReqDetails, String serviceUid, String artifactUid, User sdncModifierDetails, String httpMethod, String checksum) throws IOException
IOException
public static RestResponse addInformationalArtifactToResource(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String resourceUid) throws IOException
IOException
public static RestResponse explicitAddInformationalArtifactToResource(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String resourceUid) throws IOException
IOException
public static RestResponse addInformationalArtifactToResource(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String resourceUid, String checksum) throws IOException
IOException
public static RestResponse updateInformationalArtifactToResource(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String resourceUid) throws IOException
IOException
public static RestResponse updateInformationalArtifactToResource(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String resourceUid, String checksum) throws IOException
IOException
public static RestResponse uploadArtifactToPlaceholderOnResource(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String resourceUid, String placeHolderLabel) throws IOException
IOException
public static RestResponse updateDeploymentArtifactToResource(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String resourceUid) throws IOException
IOException
public static RestResponse updateArtifactToResourceInstance(ArtifactDefinition artifactDefinition, User sdncModifierDetails, String resourceInstanceId, String serviceId) throws IOException
IOException
public static RestResponse updateDeploymentArtifactToRI(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String resourceInstanceId, String serviceId) throws IOException
IOException
public static RestResponse deleteArtifactFromResourceInstance(ArtifactDefinition artifactDefinition, User sdncModifierDetails, String resourceUid, String serviceId) throws IOException
IOException
public static RestResponse deleteInformationalArtifactFromResource(String resourceUid, ArtifactReqDetails artifactDetails, User sdncModifierDetails) throws IOException
IOException
public static RestResponse deleteInformationalArtifactFromResource(String resourceUid, String artifactId, User sdncModifierDetails) throws IOException
IOException
public static RestResponse deleteServiceApiArtifact(ArtifactReqDetails artifactDetails, String serviceUniqueId, User user) throws Exception
Exception
public static RestResponse addArtifactToResourceInstance(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String resourceInstanceId, String serviceId) throws IOException
artifactDetails
- sdncModifierDetails
- resourceInstanceId
- serviceId
- IOException
public static RestResponse uploadDeploymentArtifact(ArtifactReqDetails artifactDetails, Component component, User sdncModifierDetails) throws IOException
IOException
public static RestResponse uploadArtifact(ArtifactReqDetails artifactDetails, Component component, User sdncModifierDetails) throws IOException
IOException
public static String calculateChecksum(ArtifactReqDetails artifactDetails)
public static String getPartialUrlByArtifactName(ServiceReqDetails serviceDetails, String serviceVersion, String artifactName)
public static String getUniqueIdOfArtifact(RestResponse createResponse, String artifactField, String requieredArtifactLabel) throws Exception
Exception
public static Map<String,Object> getArtifactFromRestResponse(RestResponse response, String artifactField, String requieredArtifactLabel)
public static RestResponse updateInformationalArtifactPayloadOfService(ArtifactReqDetails artifactDetails, User sdncModifierDetails, String serviceUid, String artifactUid) throws IOException
IOException
public static String calculateMD5Header(ArtifactReqDetails artifactDetails)
Copyright © 2017. All rights reserved.