1 package nl.hippo.cms.workflows.reviewedactions; 2 3 import java.io.IOException ; 4 import java.util.HashMap ; 5 import java.util.Map ; 6 import nl.hippo.cms.Constants; 7 import nl.hippo.cms.workflows.shared.QueryDataRetrieverComponent; 8 import nl.hippo.cocoon.webdav.WebDAVHelper; 9 import org.apache.commons.httpclient.HttpState; 10 11 public class WaitingForDeletionReviewDataRetriever extends QueryDataRetrieverComponent 12 { 13 14 public WaitingForDeletionReviewDataRetriever() 15 { 16 super(); 17 } 18 19 public Map getDataImpl(String uri, String repositoryRootUri, HttpState httpState) throws IOException 20 { 21 Map result = new HashMap (); 22 String lastUserName = WebDAVHelper.propfindAsString(uri, Constants.CMS_1_0_NAMESPACE, Constants.LAST_WORKFLOW_USER_PROPERTY_NAME, httpState); 23 if (lastUserName != null && !lastUserName.equals("")) 24 { 25 String displayName = WebDAVHelper.propfindAsString(repositoryRootUri + "/users/" + lastUserName, "DAV:", "displayname", httpState); 26 if (displayName != null && !displayName.equals("")) 27 { 28 lastUserName = displayName; 29 } 30 } 31 result.put("person", lastUserName); 32 33 return result; 34 } 35 36 } 37 | Popular Tags |