05-25-2010 07:44 AM
Failed to run Actions due to error: 04250001 A value for the mandatory parameter mime-type has not been set on the rule item fits-transform
05-27-2010 05:01 AM
var action_name = "fits-transform";
var act = actions.create(action_name);
act.parameters["mime-type"] = "text/xml";
act.parameters["destination-folder"] = userhome;
act.parameters["assoc-type"] = "cm:contains";
act.parameters["assoc-name"] = "cm:copy";
act.execute(document);
<bean id="fits-transform" class="uk.ac.st_andrews.repo.action.executer.FITSTransformActionExecuter" parent="transform">
<property name="fitsContentTransformer">
<ref bean="transformer.FitsWrapper" />
</property>
</bean>
public class FITSTransformActionExecuter extends TransformActionExecuter
{
public static final String NAME = "fits-transform";
private ContentTransformer fitsContentTransformer;
public void setFitsContentTransformer(ContentTransformer trans)
{
this.fitsContentTransformer = trans;
}
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
super.addParameterDefinitions(paramList);
}
protected void doTransform( Action ruleAction, NodeRef sourceNodeRef, ContentReader contentReader, NodeRef destinationNodeRef, ContentWriter contentWriter)
{
ruleAction.getParameterValue(PARAM_CONVERT_COMMAND);
TransformationOptions options = new TransformationOptions();
if (!this.fitsContentTransformer.isTransformable(contentReader.getMimetype(), contentWriter.getMimetype(), options))
{
throw new NoTransformerException(contentReader.getMimetype(), contentWriter.getMimetype());
}
this.fitsContentTransformer.transform(contentReader, contentWriter, options);
}
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.