package org.openecomp.appc.sdc.artifacts.helper;
+import org.apache.commons.lang.StringUtils;
import org.openecomp.appc.exceptions.APPCException;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
arguments.add(artifact.getServiceUUID());
arguments.add(artifact.getDistributionId());
arguments.add(artifact.getServiceName());
- arguments.add(artifact.getServiceDescription());
+ arguments.add(truncateServiceDescription(artifact.getServiceDescription()));
arguments.add(artifact.getResourceUUID());
arguments.add(artifact.getResourceInstanceName());
arguments.add(artifact.getResourceName());
return arguments;
}
+ private String truncateServiceDescription(String serviceDescription){
+ if (!StringUtils.isBlank(serviceDescription) && serviceDescription.length()>255){
+ logger.info("Truncating the SERVICE_DESCRIPTION to 255 characters");
+ serviceDescription=serviceDescription.substring(0,255);
+ }
+ return serviceDescription;
+ }
+
/**
* Reads the SDC artifact from APP-C database
* @param resourceName - resource Name from ASDC Artifact