Hi guys i am doing alfresco using opencmis apache chemistry.
I have done many services such as creating folder,subfolder,uploading,downloading with version updates.
Now i am trying to generate link of folder/document whatever the link is in
dashboard of alfresco.
Somebody is there who can help me to genrate the link using openCmis(java)??
Thanks in advance
public String dowloadingDocument(String docuementID){
Session cmisSession=new CreateSession().getSession();
Document document=(Document) cmisSession.getObject(docuementID);
String link=null;
try {
Method loadLink = AbstractAtomPubService.class.getDeclaredMethod("loadLink",
new Class[] { String.class, String.class, String.class, String.class });
try {
link=(String) loadLink.invoke(cmisSession.getBinding().getObjectService(),cmisSession.getRepositoryInfo().getId(),document.getId(),AtomPubParser.LINK_REL_CONTENT,null);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (SecurityException e) {
e.printStackTrace();
}
return link;
}
J2EEand i have a path to get myFileorFolderfrom my app is this what you want ??? - Yagami Light