saveAttachment(ctx, comp, false);
}
public void saveAttachment(String deploymentName, ManagedComponent component, boolean remove) throws Exception
{
VFSDeploymentContext ctx = getDeploymentContext(deploymentName);
if(ctx == null)
throw new IllegalStateException("Cannot persist attachment, failed to find deployment: " + deploymentName);
// Create the path
String deploymentPath = createRelativeDeploymentPath(ctx.getName(), ctx.getSimpleName());
// Load previous saved information
RepositoryAttachmentMetaData repositoryMetaData = loadAttachmentMetaData(deploymentPath);
if(repositoryMetaData == null)
{
repositoryMetaData = RepositoryAttachmentMetaDataFactory.createInstance();
repositoryMetaData.setDeploymentName(ctx.getSimpleName());
}
// Get the parent MO
ManagedCommon parent = component;
while(parent.getParent() != null)