1 23 package org.infoglue.cms.applications.workflowtool.function.title; 24 25 import org.infoglue.cms.applications.workflowtool.function.ContentPopulator; 26 import org.infoglue.cms.applications.workflowtool.util.ContentVersionValues; 27 28 import com.opensymphony.workflow.WorkflowException; 29 30 public class ContentVersionTitlePopulator extends Populator 31 { 32 35 private static final String ATTRIBUTE_ARGUMENT = "attributeName"; 36 37 40 private String title; 41 42 43 44 47 public ContentVersionTitlePopulator() 48 { 49 super(); 50 } 51 52 55 protected String getTitle() 56 { 57 return title; 58 } 59 60 66 protected void initialize() throws WorkflowException 67 { 68 super.initialize(); 69 final String attributeName = getArgument(ATTRIBUTE_ARGUMENT); 70 final ContentVersionValues contentVersionValues = (ContentVersionValues) getParameter(ContentPopulator.CONTENT_VERSION_VALUES_PARAMETER, null); 71 if(contentVersionValues != null && contentVersionValues.contains(attributeName)) 72 { 73 title = contentVersionValues.get(attributeName).toString(); 74 } 75 } 76 } 77 | Popular Tags |