org.yestech.publish.objectmodel.TerracottaPipeArtifact Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yespublish Show documentation
Show all versions of yespublish Show documentation
Framework to publish ascii or binary data
to different sources. Currently Episodic, Bitgravity, Local, Cloudfs,
and S3 are supported
/*
* Copyright LGPL3
* YES Technology Association
* http://yestech.org
*
* http://www.opensource.org/licenses/lgpl-3.0.html
*/
/*
*
* Author: Artie Copeland
* Last Modified Date: $DateTime: $
*/
package org.yestech.publish.objectmodel;
import org.yestech.publish.util.PublishUtils;
import java.util.Map;
import static com.google.common.collect.Maps.newHashMap;
/**
* @author Artie Copeland
* @version $Revision: $
*/
@SuppressWarnings("unchecked")
public class TerracottaPipeArtifact implements IArtifact {
private IArtifact artifact;
private Map parameters = newHashMap();
@Override
public Object getArtifactIdentifier() {
return null;
}
@Override
public void setArtifactIdentifier(Object identifier) {
}
@Override
public IArtifactMetaData getArtifactMetaData() {
return null;
}
@Override
public void setArtifactMetaData(IArtifactMetaData artifactMetaData) {
}
public IArtifact getArtifact() {
return artifact;
}
public void setArtifact(IArtifact artifact) {
this.artifact = artifact;
}
public Map getParameters() {
return parameters;
}
public void setParameters(Map parameters) {
this.parameters = parameters;
}
public T getParameter(String key) {
return (T) parameters.get(key);
}
public static TerracottaPipeArtifact create(IArtifact artifact) {
TerracottaPipeArtifact terracottaArtifact = new TerracottaPipeArtifact();
terracottaArtifact.setArtifact(artifact);
if (PublishUtils.isFileArtifact(artifact)) {
IFileArtifact fileArtifact = (IFileArtifact) artifact;
PublishUtils.reset(fileArtifact);
}
return terracottaArtifact;
}
}