Hi,
I have a requirement to update certain properties of a document and then convert it to Virtual Document
Below is my code
class D2VDConverttoXYZPlugin implements IPluginAction {
private static final Logger LOGGER = LoggerFactory.getLogger(D2VDConverttoXYZPlugin.class);
public List<Attribute> convertToXYZ(D2fsContext aoD2fsContext) throws UnsupportedEncodingException, DfException, D2fsException {
List <Attribute> result = new ArrayList <Attribute>();
IDfSession session = aoD2fsContext.getSession();
List<String> llObjectID = aoD2fsContext.getParameterParser().getListParameter("id");
String lsObjectID = llObjectID.get(0);
IDfSysObject object = (IDfSysObject) session.getObject(new DfId(lsObjectID));
object.setString("<custom attribute>", "<specific value>");
object.setIsVirtualDocument(true);
Attribute oamID = new Attribute();
oamID.setName("oam_id");
oamID.setValue(lsObjectID);
result.add(oamID);
object.save();
return result;
}
}
I need to refresh the document list after this update is done
I tried doing it with 'D2_ACTION_OPEN_VD'
But it is not doing anything
I have set Type as 'JS' in the method call in Menu Config\
Any idea how i can achieve this?
Regards
Hetal