Hi,
On the CI Properties page I see a State field that has values like 'Published', 'Unpublished', 'stale' etc. How to get the same through API?
Thanks in advance
Check theManagedObject status on specific site:
privatestatic String getpublishStatus(ManagedObjectmo, StringstrSiteName) {
StringpublishStatus=null;
ManagedObjectVCMRefmoVcmRef =new ManagedObjectVCMRef(mo.getContentManagementId().getId());
try {
Sitesite = Site.findByName(strSiteName);
System.out.println("Site: " + site.getName() +" -- "+mo.getContentManagementId());
PublishedStatusps =site.getDeploymentStatus(moVcmRef);
if(ps.isPublished()) {
publishStatus ="Published";
}elseif(ps.isInProcess()) {
publishStatus ="InProgress";
}elseif(ps.isStale()) {
publishStatus ="Stale";
}elseif(ps.isUnknown()) {
publishStatus ="Unknown";
}elseif(ps.isUnPublished()) {
publishStatus ="Unpublished";
}
}catch (ApplicationExceptione) {
// TODO Auto-generated catch block
e.printStackTrace();
}catch (ValidationExceptione) {
System.out.println(publishStatus);
returnpublishStatus;
-Regards,
Trilochan
Thanks for your response and the code sample!