try
{
Repository repository = WCM_API.getRepository();
Workspace workspace = repository.getWorkspace(request.getUserPrincipal());
String libname="Test-library";
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary(libNames));
DocumentIdIterator contentIterator = workspace.findByType(DocumentTypes.Content);
DocumentId contentId = null;
while(contentIterator.hasNext())
{
contentId = contentIterator.nextId();
ArrayList<String> arrayList = new ArrayList<String>();
Reference []ref =workspace.getReferencesFrom(contentId);
for(int i=0 ; i< ref.length ;i++)
{
String refLibName = ref[i].getRefererDocumentId().getContainingLibrary().getName();
System.out.println("--------------Referenced Library Name-------------"+refLibName);
}
}
}
{
Repository repository = WCM_API.getRepository();
Workspace workspace = repository.getWorkspace(request.getUserPrincipal());
String libname="Test-library";
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary(libNames));
DocumentIdIterator contentIterator = workspace.findByType(DocumentTypes.Content);
DocumentId contentId = null;
while(contentIterator.hasNext())
{
contentId = contentIterator.nextId();
ArrayList<String> arrayList = new ArrayList<String>();
Reference []ref =workspace.getReferencesFrom(contentId);
for(int i=0 ; i< ref.length ;i++)
{
String refLibName = ref[i].getRefererDocumentId().getContainingLibrary().getName();
System.out.println("--------------Referenced Library Name-------------"+refLibName);
}
}
}
No comments:
Post a Comment