Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  
  package org.kuali.rice.kew.doctype.bo;
  
  
  import java.util.Arrays;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  import java.util.Set;
  
  import static org.kuali.rice.kew.api.doctype.DocumentTypePolicy.*;

Model bean mapped to ojb representing a document type. Provides component lookup behavior that can construct ObjectDefinition objects correctly to account for application id inheritance. Can also navigate parent hierarchy when getting data/components.

Author(s):
Kuali Rice Team (rice.collab@kuali.org)
  
  //@Sequence(name="KREW_DOC_HDR_S", property="documentTypeId")
 @Table(name = "KREW_DOC_TYP_T")
         @NamedQuery(name = "DocumentType.QuickLinks.FindLabelByTypeName", query = "SELECT label FROM DocumentType WHERE name = :docTypeName AND currentInd = 1"),
         @NamedQuery(name = "DocumentType.QuickLinks.FindInitiatedDocumentTypesListByInitiatorWorkflowId", query = "SELECT DISTINCT dt.name, dt.label FROM DocumentType dt, DocumentRouteHeaderValue drhv " +
                 "WHERE drhv.initiatorWorkflowId = :initiatorWorkflowId AND drhv.documentTypeId = dt.documentTypeId AND dt.active = 1 AND dt.currentInd = 1 " +
                 "ORDER BY UPPER(dt.label)")
 })
     private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(DocumentType.class);
 
     private static final long serialVersionUID = 1312830153583125069L;
 
     @Id
     @GeneratedValue(generator = "KREW_DOC_HDR_S")
     @GenericGenerator(name = "KREW_DOC_HDR_S", strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator", parameters = {
             @Parameter(name = "sequence_name", value = "KREW_DOC_HDR_S"),
             @Parameter(name = "value_column", value = "id")
     })
     @Column(name = "DOC_TYP_ID")
     private String documentTypeId;
     @Column(name = "PARNT_ID")
     private String docTypeParentId;
     @Column(name = "DOC_TYP_NM")
     private String name;
     @Column(name = "DOC_TYP_VER_NBR")
     private Integer version = new Integer(0);
     @Column(name = "ACTV_IND")
     private Boolean active;
     @Column(name = "CUR_IND")
     private Boolean currentInd;
     @Column(name = "DOC_TYP_DESC")
     private String description;
     @Column(name = "LBL")
     private String label;
     @Column(name = "PREV_DOC_TYP_VER_NBR")
     private String previousVersionId;
    
The id of the document which caused the last modification of this document type. Null if this doc type was never modified via a document routing (UI).
 
     @Column(name = "DOC_HDR_ID")
     private String documentId;
 
     @Column(name = "HELP_DEF_URL")
 
     @Column(name = "DOC_SEARCH_HELP_URL")
 
     @Column(name = "DOC_HDLR_URL")
     private String unresolvedDocHandlerUrl;
     @Column(name = "POST_PRCSR")
     private String postProcessorName;
     @Column(name = "GRP_ID")
     //private Long superUserWorkgroupId;
     private String workgroupId;
     @Column(name = "BLNKT_APPR_GRP_ID")
     @Column(name = "BLNKT_APPR_PLCY")
     private String blanketApprovePolicy;
     @Column(name = "RPT_GRP_ID")
     private String reportingWorkgroupId;
     @Column(name = "APPL_ID")
     private String actualApplicationId;

    

Since:
2.1.3
 
     @Column(name = "AUTHORIZER")
     private String authorizer;
 
 
     /* these two fields are for the web tier lookupable
      * DocumentType is doing double-duty as a web/business tier object
      */
     @Transient
     private String returnUrl;
     @Transient
     private String actionsUrl;
     @Transient
     private Boolean applyRetroactively = .;
 
     /* The default exception workgroup to apply to nodes that lack an exception workgroup definition.
      * Used at parse-time only; not stored in db.
      */
     @Transient
     private Group defaultExceptionWorkgroup;
 
     @OneToMany(fetch = ., cascade = {...}, mappedBy = "documentType")
     @Fetch(value = .)
 
     /* This property contains the list of valid ApplicationDocumentStatus values, 
     * if defined, for the document type.  If these status values are defined, only these
     * values may be assigned as the status.  If not valid values are defined, the status may
     * be set to any value by the client.
     */
     @OneToMany(fetch = ., cascade = {...}, mappedBy = "documentType")
     @Fetch(value = .)
 
     // TODO: map this for JPA
 
     @Transient
     private List routeLevels;
     @Transient
     private Collection childrenDocTypes;
     @Fetch(value = .)
     @OneToMany(fetch = ., cascade = {...}, mappedBy = "documentType")
     @OrderBy("orderIndex ASC")
 
     /* New Workflow 2.1 Field */
     @Fetch(value = .)
     @OneToMany(fetch = ., cascade = {..}, mappedBy = "documentType")
     private List<ProcessDefinitionBoprocesses = new ArrayList();
     @Column(name = "RTE_VER_NBR")
 
     /* Workflow 2.2 Fields */
     @Column(name = "NOTIFY_ADDR")
     @Lob
     @Basic(fetch = .)
     @Column(name = "SEC_XML")
     private String documentTypeSecurityXml;
     @Transient
 
     /* Workflow 2.4 XSLT-based email message customization */
     @Column(name = "EMAIL_XSL")
     private String customEmailStylesheet;
 
     public DocumentType() {
          = new ArrayList();
          = new Integer(0);
          = null;
     }
 
     public void populateDataDictionaryEditableFields(Set<StringpropertyNamesEditableViaUIDocumentType dataDictionaryEditedType) {
         String currentPropertyName = "";
         try {
             for (String propertyName : propertyNamesEditableViaUI) {
                 currentPropertyName = propertyName;
                 if (..equals(propertyName)) {
                     // this is trying to set the parent document type name so lets set the entire parent document
                     String parentDocumentTypeName = (String) ObjectUtils.getPropertyValue(dataDictionaryEditedTypepropertyName);
                     if (StringUtils.isNotBlank(parentDocumentTypeName)) {
                         DocumentType parentDocType = KEWServiceLocator.getDocumentTypeService().findByName(parentDocumentTypeName);
                         if (ObjectUtils.isNull(parentDocType)) {
                             throw new WorkflowRuntimeException("Could not find valid document type for document type name '" + parentDocumentTypeName + "' to set as Parent Document Type");
                         }
                         setDocTypeParentId(parentDocType.getDocumentTypeId());
                     }
                 }
 //                else if (!FIELD_PROPERTY_NAME_DOCUMENT_TYPE_ID.equals(propertyName)) {
                 else {
                     .info("*** COPYING PROPERTY NAME FROM OLD BO TO NEW BO: " + propertyName);
                     ObjectUtils.setObjectProperty(thispropertyName, ObjectUtils.getPropertyValue(dataDictionaryEditedTypepropertyName));
                 }
             }
         } catch (FormatException e) {
             throw new WorkflowRuntimeException("Error setting property '" + currentPropertyName + "' in Document Type"e);
         } catch (IllegalAccessException e) {
             throw new WorkflowRuntimeException("Error setting property '" + currentPropertyName + "' in Document Type"e);
         } catch (InvocationTargetException e) {
             throw new WorkflowRuntimeException("Error setting property '" + currentPropertyName + "' in Document Type"e);
         } catch (NoSuchMethodException e) {
             throw new WorkflowRuntimeException("Error setting property '" + currentPropertyName + "' in Document Type"e);
         } catch (Exception e) {
             throw new WorkflowRuntimeException("Error setting property '" + currentPropertyName + "' in Document Type"e);
         }
     }
 
     }
 
         return getPolicyByName(.getCode(), .);
     }
 
     }
 
     }
 
     }
 
     }
 
     }
 
         return getPolicyByName(.getCode(), .);
     }
 
     }
 
     }
 
         return getPolicyByName(.getCode(), .);
     }

    
This method returns a DocumentTypePolicy object related to the DocumentStatusPolicy defined for this document type.
 
     }

    
This method returns a DocumentTypePolicy object related to the DocumentStatusPolicy defined for this document type.
 
     }
         
     }
     
     }
     
     }

    
Returns the RECALL_NOTIFICATION policy on the document if defined, or the default value for this policy which is true.

Returns:
the RECALL_NOTIFICATION document type policy
Since:
2.1
 
         return getPolicyByName(.getCode(), (Stringnull);
     }

    
Returns the SUPPRESS_IMMEDIATE_EMAILS_ON_SU_ACTION policy on the document if defined, or the default value for this policy which is false.

Returns:
the SUPPRESS_IMMEDIATE_EMAILS_ON_SU_ACTION document type policy
Since:
2.1.3
 
     }

    
Returns the ALLOW_SU_FINAL_APPROVAL policy on the document if defined, or the default value for this policy which is true.

Returns:
the ALLOW_SU_FINAL_APPROVAL document type policy
Since:
2.1.3
 
     }

    
This method returns a boolean denoting whether the KEW Route Status is to be displayed. The KEW Route Status is updated by the workflow engine regardless of whether it is to be displayed or not.

Returns:
true - if the status is to be displayed (Policy is set to either use KEW (default) or both) false - if the KEW Route Status is not to be displayed
 
     public Boolean isKEWStatusInUse() {
         if (isPolicyDefined()) {
             return (policyValue == null || "".equals(policyValue)
                     || ..equalsIgnoreCase(policyValue)
                     || ..equalsIgnoreCase(policyValue)) ? . : .;
         } else {
             return .;
         }
     }

    
This method returns a boolean denoting whether the Application Document Status is to be used for this document type.

Returns:
true - if the status is to be displayed (Policy is set to either use the application document status or both) false - if only the KEW Route Status is to be displayed (default)
 
     public Boolean isAppDocStatusInUse() {
         if (isPolicyDefined()) {
             return (..equalsIgnoreCase(policyValue)
                     || ..equalsIgnoreCase(policyValue)) ? . : .;
         } else {
             return .;
         }
     }

    
This method returns a boolean denoting if both the KEW Route Status and the Application Document Status are to be used in displays.

Returns:
true - if both the KEW Route Status and Application Document Status are to be displayed. false - if only one status is to be displayed.
 
     public Boolean areBothStatusesInUse() {
         if (isPolicyDefined()) {
             return (..equalsIgnoreCase(policyValue)) ? . : .;
         } else {
             return .;
         }
     }
 
         if (getUseWorkflowSuperUserDocHandlerUrl() != null) {
             return getUseWorkflowSuperUserDocHandlerUrl().getPolicyDisplayValue();
         }
         return null;
     }
 
         if (getAllowUnrequestedActionPolicy() != null) {
             return getAllowUnrequestedActionPolicy().getPolicyDisplayValue();
         }
         return null;
     }
 
         if (getDefaultApprovePolicy() != null) {
             return getDefaultApprovePolicy().getPolicyDisplayValue();
         }
         return null;
     }
 
         if (getInitiatorMustRoutePolicy() != null) {
             return getInitiatorMustRoutePolicy().getPolicyDisplayValue();
         }
         return null;
     }
 
         if (getInitiatorMustSavePolicy() != null) {
             return getInitiatorMustSavePolicy().getPolicyDisplayValue();
         }
         return null;
     }
 
     public boolean isPolicyDefined(org.kuali.rice.kew.api.doctype.DocumentTypePolicy policyToCheck) {
         Iterator<DocumentTypePolicypolicyIter = getDocumentTypePolicies().iterator();
         while (policyIter.hasNext()) {
             DocumentTypePolicy policy = policyIter.next();
             if (policyToCheck.getCode().equals(policy.getPolicyName())) {
                 return true;
             }
         }
         return getParentDocType() != null && getParentDocType().isPolicyDefined(policyToCheck);
     }
 
     public List<DocumentTypeAttributeBogetDocumentTypeAttributes(String... attributeTypes) {
         List<DocumentTypeAttributeBofilteredAttributes = new ArrayList<DocumentTypeAttributeBo>();
         if (CollectionUtils.isNotEmpty()) {
             if (attributeTypes == null) {
                 filteredAttributes.addAll();
             } else {
                 List<StringattributeTypeList = Arrays.asList(attributeTypes);
                 for (DocumentTypeAttributeBo documentTypeAttribute : ) {
                     RuleAttribute ruleAttribute = documentTypeAttribute.getRuleAttribute();
                     if (attributeTypeList.contains(ruleAttribute.getType())) {
                         filteredAttributes.add(documentTypeAttribute);
                     }
                 }
             }
         }
         if (filteredAttributes.isEmpty() && getParentDocType() != null) {
             return getParentDocType().getDocumentTypeAttributes(attributeTypes);
         }
         return Collections.unmodifiableList(filteredAttributes);
     }
 
     public boolean hasSearchableAttributes() {
         return !getSearchableAttributes().isEmpty();
     }
 
     }
 
         if (documentTypeAttributes.size() > 1) {
             throw new IllegalStateException("Encountered more than one DocumentSearchCustomizer attribute on this document type: " + getName());
         }
         if (documentTypeAttributes.isEmpty()) {
             return null;
         }
         return documentTypeAttributes.get(0);
     }

    
Returns the RuleAttribute for the action list attribute for this DocumentType. Walks the document type hierarchy if none exists directly on this DocumentType.

Returns:
The RuleAttribute. May be null.
 
         if (documentTypeAttributes.size() > 1) {
             throw new IllegalStateException("Encountered more than one ActionListAttribute on this document type: " + getName());
         }
         if (documentTypeAttributes.isEmpty()) {
             return null;
         }
         return documentTypeAttributes.get(0).getRuleAttribute();
     }
 
         List<DocumentTypeAttributeBosearchableAttributes = getSearchableAttributes();
         List<ExtensionHolder<SearchableAttribute>> loadedAttributes = new ArrayList<ExtensionHolder<SearchableAttribute>>();
         for (DocumentTypeAttributeBo documentTypeAttribute : searchableAttributes) {
             RuleAttribute ruleAttribute = documentTypeAttribute.getRuleAttribute();
             try {
                 ExtensionDefinition extensionDefinition = KewApiServiceLocator.getExtensionRepositoryService().getExtensionById(ruleAttribute.getId());
                 SearchableAttribute attributeService = ExtensionUtils.loadExtension(extensionDefinitiongetApplicationId());
                 loadedAttributes.add(new ExtensionHolder<SearchableAttribute>(extensionDefinitionattributeService));
             } catch (RiceRemoteServiceConnectionException e) {
                 .warn("Unable to connect to load searchable attribute for " + ruleAttributee);
             }
         }
         return loadedAttributes;
     }
 
     public static final class ExtensionHolder<T> {
 
         //private final RuleAttribute ruleAttribute;
         private final ExtensionDefinition extensionDefinition;
         private final T extension;
 
         public ExtensionHolder(ExtensionDefinition extensionDefinition, T extension) {
             //this.ruleAttribute = ruleAttribute;
             this. = extensionDefinition;
             this. = extension;
         }
 
         /*public RuleAttribute getRuleAttribute() {
             return ruleAttribute;
         }*/
 
         public ExtensionDefinition getExtensionDefinition() {
             return ;
         }
 
         public T getExtension() {
             return ;
         }
     }
 
     public DocumentTypeAttributeBo getDocumentTypeAttribute(int index) {
         while (getDocumentTypeAttributes().size() <= index) {
             DocumentTypeAttributeBo attribute = new DocumentTypeAttributeBo();
             //attribute.setDocumentTypeId(this.documentTypeId);
             getDocumentTypeAttributes().add(attribute);
         }
         return (DocumentTypeAttributeBogetDocumentTypeAttributes().get(index);
     }
 
     public void setDocumentTypeAttribute(int indexDocumentTypeAttributeBo documentTypeAttribute) {
         .set(indexdocumentTypeAttribute);
     }
 
         if (getActive() == null) {
             return .;
         }
         return CodeTranslator.getActiveIndicatorLabel(getActive());
     }
 
     public Collection getChildrenDocTypes() {
         if (this. == null) {
             this. = KEWServiceLocator.getDocumentTypeService().getChildDocumentTypes(getDocumentTypeId());
         }
         return ;
     }
 
     public String getDocTypeParentId() {
         return ;
     }
 
     public void setDocTypeParentId(String docTypeParentId) {
         this. = docTypeParentId;
     }
 
     public DocumentType getParentDocType() {
         return KEWServiceLocator.getDocumentTypeService().findById(this.);
     }
 
         return ;
     }
 
     public void setDocumentTypePolicies(Collection<DocumentTypePolicypolicies) {
         this. = policies;
     }
     
     @Override
         if (this. != null) {
             for (DocumentTypePolicy policy : this.) {
                 policies.put(fromCode(policy.getPolicyName()), policy.getPolicyValue().toString());
             }
         }
         return policies;
     }
 
         if((ObjectUtils.isNull(this.) || this..isEmpty())
                 && ObjectUtils.isNotNull(getParentDocType()) && isAppDocStatusInUse()) {
             return getParentDocType().getValidApplicationStatuses();
        }
         return this.;
     }
 
     public void setValidApplicationStatuses(
             List<ApplicationDocumentStatusvalidApplicationStatuses) {
         this. = validApplicationStatuses;
     }

    
Get the application document status categories for this document type

Returns:
the application document status categories for this document type
See also:
org.kuali.rice.kew.doctype.ApplicationDocumentStatusCategory
 
         if((ObjectUtils.isNull(this.) || this..isEmpty())
                 && ObjectUtils.isNotNull(getParentDocType()) && isAppDocStatusInUse()) {
             return getParentDocType().getApplicationStatusCategories();
         }
         return ;
     }

    
Set the application document status categories for this document type

Parameters:
applicationStatusCategories
 
     public void setApplicationStatusCategories(List<ApplicationDocumentStatusCategoryapplicationStatusCategories) {
         this. = applicationStatusCategories;
     }
 
     public String getDocumentTypeSecurityXml() {
         return ;
     }
 
     public void setDocumentTypeSecurityXml(String documentTypeSecurityXml) {
         this. = documentTypeSecurityXml;
         if (StringUtils.isNotBlank(documentTypeSecurityXml)) {
             this. = new DocumentTypeSecurity(this.getApplicationId(), documentTypeSecurityXml);
         } else {
             this. = null;
         }
     }
 
         if (this. == null &&
                 this. != null &&
                 !org.apache.commons.lang.StringUtils.isEmpty(.trim())) {
         }
         if ((this. == null) && (getParentDocType() != null)) {
             return getParentDocType().getDocumentTypeSecurity();
         }
         return this.;
     }
 
 
     public List getRouteLevels() {
         if (.isEmpty() && getParentDocType() != null) {
             return getParentRouteLevels(getParentDocType());
         }
         return ;
     }
 
     private List getParentRouteLevels(DocumentType parent) {
         if (parent.getRouteLevels() == null) {
             return getParentRouteLevels(parent.getParentDocType());
         } else {
             return parent.getRouteLevels();
         }
     }
 
     public void setRouteLevels(List routeLevels) {
         this. = routeLevels;
     }
 
     public String getActionsUrl() {
         return ;
     }
 
     public void setActionsUrl(String actions) {
         this. = actions;
     }
 
     public Boolean getActive() {
         return ;
     }
 
     public void setActive(java.lang.Boolean activeInd) {
         this. = activeInd;
     }
 
     public java.lang.Boolean getCurrentInd() {
         return ;
     }
     
     @Override
     public boolean isCurrent() {
         if ( == null) {
             return true;
         }
         return .booleanValue();
     }
 
     public void setCurrentInd(java.lang.Boolean currentInd) {
         this. = currentInd;
     }
 
     public java.lang.String getDescription() {
         return ;
     }
 
     public void setDescription(java.lang.String description) {
         this. = description;
     }

    
This method retrieves the unresolved document handler URL from this object
 
     /*public String getDocHandlerUrl() {
         return getUnresolvedDocHandlerUrl();
     }*/
    
    
This method gets the document handler url from this object or from a parent document type and resolves any potential variables that may be in use
 
     @Override
     }

    
This method retrieves the unresolved document handler URL either from this object or from a parent document type object. If the forDisplayPurposes value is true the value returned will be invalid for system use.

This method will first call the getUnresolvedDocHandlerUrl() method to check for a value on this object. If none is found a parent document type must exist because the document handler URL is required and is used. The system will use inheritance to find the document handler url from a document type somewhere in the hierarchy.

Parameters:
forDisplayPurposes - if true then the string returned will have a label explaining where the value came from
Returns:
the unresolved document handler URL value or a displayable value with sourcing information
 
     protected String getUnresolvedInheritedDocHandlerUrl(boolean forDisplayPurposes) {
         if (StringUtils.isNotBlank(getUnresolvedDocHandlerUrl())) {
             // this object has a direct value set, so return it
             return getUnresolvedDocHandlerUrl();
         }
         // check for a parent document to see if the doc handler url can be inherited
         DocumentType docType = getParentDocType();
         if (ObjectUtils.isNotNull(docType)) {
             String parentValue = docType.getUnresolvedDocHandlerUrl();
             if (StringUtils.isNotBlank(parentValue)) {
                 // found a parent value set on the immediate parent object so return it
                 if (forDisplayPurposes) {
                     parentValue += " " + .;
                 }
                 return parentValue;
             }
             // no valid value exists on the immediate parent, so check the hierarchy
             return docType.getUnresolvedInheritedDocHandlerUrl(forDisplayPurposes);
         }
         return null;
     }

    
Returns the same value as the getUnresolvedInheritedDocHandlerUrl(boolean) method but will also have label information about whether the value returned came from this object or the parent document type associated with this object
 
         return getUnresolvedInheritedDocHandlerUrl(true);
     }

    
EMPTY METHOD. Use setUnresolvedDocHandlerUrl(java.lang.String) instead.

Deprecated:
 
     public void setDisplayableUnresolvedDocHandlerUrl(String displayableUnresolvedDocHandlerUrl) {
         // do nothing
     }

    

Returns:
the unresolvedDocHandlerUrl
 
     @Override
     public String getUnresolvedDocHandlerUrl() {
         return this.;
     }

    

Parameters:
unresolvedDocHandlerUrl the unresolvedDocHandlerUrl to set
 
     public void setUnresolvedDocHandlerUrl(String unresolvedDocHandlerUrl) {
         this. = unresolvedDocHandlerUrl;
     }

    
If the doc handler URL has variables in it that need to be replaced, this will look up the values for those variables and replace them in the doc handler URL.
 
     protected String resolveDocHandlerUrl(String docHandlerUrl) {
         if (StringUtils.isBlank(docHandlerUrl)) {
             return "";
         }
         return Utilities.substituteConfigParameters(getApplicationId(), docHandlerUrl);
     }

    
Use setDocHandlerUrl(java.lang.String) to add a document handler url to this object.

Deprecated:
 
     public void setDocHandlerUrl(java.lang.String docHandlerUrl) {
         setUnresolvedDocHandlerUrl(docHandlerUrl);
     }

    

Returns:
the unresolvedHelpDefinitionUrl
 
         return this.;
     }

    

Parameters:
unresolvedHelpDefinitionUrl the unresolvedHelpDefinitionUrl to set
 
     public void setUnresolvedHelpDefinitionUrl(String unresolvedHelpDefinitionUrl) {
         this. = unresolvedHelpDefinitionUrl;
     }

    
This method gets the help definition url from this object and resolves any potential variables that may be in use
 
     public String getHelpDefinitionUrl() {
     }

    
If a help URL has variables in it that need to be replaced, this will look up the values for those variables and replace them.
 
     protected String resolveHelpUrl(String helpDefinitionUrl) {
         if (StringUtils.isBlank(helpDefinitionUrl)) {
             return "";
         }
         return Utilities.substituteConfigParameters(helpDefinitionUrl);
     }

    

Returns:
the unresolvedDocSearchHelpUrl
 
         return this.;
     }

    

Parameters:
unresolvedDocSearchHelpUrl the unresolvedDocSearchHelpUrl to set
 
     public void setUnresolvedDocSearchHelpUrl(String unresolvedDocSearchHelpUrl) {
         this. = unresolvedDocSearchHelpUrl;
     }

    
This method gets the doc search help url from this object and resolves any potential variables that may be in use
 
     public String getDocSearchHelpUrl() {
         return resolveHelpUrl(getUnresolvedDocSearchHelpUrl());
     }
 
     public java.lang.String getLabel() {
         return ;
     }
 
     public void setLabel(java.lang.String label) {
         this. = label;
     }
 
     public java.lang.String getName() {
         return ;
     }
 
     public void setName(java.lang.String name) {
         this. = name;
     }
 
     public PostProcessor getPostProcessor() {
         String pname = getPostProcessorName();
 
         if (StringUtils.equals(pname.)) {
             return new DefaultPostProcessor();
         }
         if (StringUtils.isBlank(pname)) {
             if (getParentDocType() != null) {
                 return getParentDocType().getPostProcessor();
             } else {
                 return new DefaultPostProcessor();
             }
         }
 
         ObjectDefinition objDef = getObjectDefinition(pname);
         Object postProcessor = GlobalResourceLoader.getObject(objDef);
 
         if (postProcessor == null) {
             throw new WorkflowRuntimeException("Could not locate PostProcessor in this JVM or at application id " + getApplicationId() + ": " + pname);
         }
 
         // TODO: KULRICE-5572 Determine whether it is safe to wrap all post processors in a fresh GlobalVariables context
         //return (PostProcessor) Proxy.newProxyInstance(postProcessor.getClass().getClassLoader(), new Class[] { PostProcessor.class }, new GlobalVariablesContextInvocationHandler(postProcessor));
         return (PostProcessorpostProcessor;
     }

    
This method gets the post processor class value. If the forDisplayPurposes value is true the value will be invalid for system use.

This method will first call the getPostProcessorName() method to check the value on this object. If none is found the system checks for a parent document type. If a valid parent type exists for this document type then the system will use inheritance from that parent document type as long as at least one document type in the hierarchy has a value set. If no value is set on any parent document type or if no parent document type exists the system will return null.

Parameters:
forDisplayPurposes - if true then the string returned will have a label explaining where the value came from
Returns:
the post processor class value or a displayable value with sourcing information
 
     protected String getInheritedPostProcessorName(boolean forDisplayPurposes) {
         if (StringUtils.isNotBlank(getPostProcessorName())) {
             // this object has a post processor class so return it
             return getPostProcessorName();
         }
         if (ObjectUtils.isNotNull(getParentDocType())) {
             // direct parent document type exists
             String parentValue = getParentDocType().getPostProcessorName();
             if (StringUtils.isNotBlank(parentValue)) {
                 // found a post processor class set on the immediate parent object so return it
                 if (forDisplayPurposes) {
                     parentValue += " " + .;
                 }
                 return parentValue;
             }
             // did not find a valid value on the immediate parent, so use hierarchy
             return getParentDocType().getInheritedPostProcessorName(forDisplayPurposes);
         }
         return null;
     }
 
     public java.lang.String getPostProcessorName() {
         return ;
     }
 
     public void setPostProcessorName(java.lang.String postProcessorName) {
         this. = postProcessorName;
     }
 
         return getInheritedPostProcessorName(true);
     }

    
EMPTY METHOD. Use setPostProcessorName(java.lang.String) instead.

Deprecated:
 
     public void setDisplayablePostProcessorName(String displayablePostProcessorName) {
         // do nothing
     }
    public String getPreviousVersionId() {
        return ;
    }
    public void setPreviousVersionId(String previousVersionId) {
        this. = previousVersionId;
    }
    public java.lang.String getDocumentId() {
        return ;
    }
    public void setDocumentId(java.lang.String documentId) {
        this. = documentId;
    }
    public java.lang.Integer getVersion() {
        return ;
    }
    public void setVersion(java.lang.Integer version) {
        this. = version;
    }
    public String getDocumentTypeId() {
        return ;
    }
    public void setDocumentTypeId(String docTypeGrpId) {
        this. = docTypeGrpId;
    }
    
    @Override
    public String getId() {
        return getDocumentTypeId();
    }
    public Object copy(boolean preserveKeys) {
        throw new UnsupportedOperationException("The copy method is deprecated and unimplemented!");
    }
    public java.lang.String getReturnUrl() {
        return ;
    }
    public void setReturnUrl(java.lang.String returnUrl) {
        this. = returnUrl;
    }

    
Returns the policy value of the specified policy, consulting parent document type definitions if not defined on the immediate DocumentType. If not found, a policy with the specified default value is returned. If policy is found on parent but boolean value is undefined, TRUE is used.

Parameters:
policyName the policy name to look up
defaultValue the default boolean value to return if policy is not found
Returns:
DocumenTypePolicy defined on immediate or parent document types, or new instance initialized with specified default boolean value
    public DocumentTypePolicy getPolicyByName(String policyNameBoolean defaultValue) {
        Iterator policyIter = getDocumentTypePolicies().iterator();
        while (policyIter.hasNext()) {
            DocumentTypePolicy policy = (DocumentTypePolicypolicyIter.next();
            if (policyName.equals(policy.getPolicyName())) {
                policy.setInheritedFlag(.);
                return policy;
            }
        }
        if (getParentDocType() != null) {
            DocumentTypePolicy policy = getParentDocType().getPolicyByName(policyNamedefaultValue);
            policy.setInheritedFlag(.);
            if (policy.getPolicyValue() == null) {
                policy.setPolicyValue(.);
            }
            return policy;
        }
        DocumentTypePolicy policy = new DocumentTypePolicy();
        policy.setPolicyName(policyName);
        policy.setInheritedFlag(.);
        policy.setPolicyValue(defaultValue);
        return policy;
    }

    
Returns the policy value of the specified policy, consulting parent document type definitions if not defined on the immediate DocumentType. If not found, a policy with a boolean value of True and a string value of the specified default value is returned. If policy is found on parent but boolean value is undefined, TRUE is used.

Parameters:
policyName the policy name to look up
defaultValue the default string value to return if policy is not found
Returns:
DocumenTypePolicy defined on immediate or parent document types, or new instance initialized with specified default string value
    public DocumentTypePolicy getPolicyByName(String policyNameString defaultValue) {
        Iterator policyIter = getDocumentTypePolicies().iterator();
        while (policyIter.hasNext()) {
            DocumentTypePolicy policy = (DocumentTypePolicypolicyIter.next();
            if (policyName.equals(policy.getPolicyName())) {
                policy.setInheritedFlag(.);
                return policy;
            }
        }
        if (getParentDocType() != null) {
            DocumentTypePolicy policy = getParentDocType().getPolicyByName(policyNamedefaultValue);
            policy.setInheritedFlag(.);
            if (policy.getPolicyValue() == null) {
                policy.setPolicyValue(.);
            }
            return policy;
        }
        DocumentTypePolicy policy = new DocumentTypePolicy();
        policy.setPolicyName(policyName);
        policy.setInheritedFlag(.);
        policy.setPolicyValue(.);
        policy.setPolicyStringValue(defaultValue);
        return policy;
    }
        return (DocumentTypeService) KEWServiceLocator.getService(.);
    }
    public Group getSuperUserWorkgroup() {
        Group superUserWorkgroup = getSuperUserWorkgroupNoInheritence();
        if (superUserWorkgroup == null && getParentDocType() != null) {
            return getParentDocType().getSuperUserWorkgroup();
        }
        return superUserWorkgroup;
    }
        if ( == null) {
            return null;
        }
        return getGroupService().getGroup(this.);
    }
    public void setSuperUserWorkgroupNoInheritence(Group suWorkgroup) {
        this. = null;
        if (ObjectUtils.isNotNull(suWorkgroup)) {
            this. = suWorkgroup.getId();
        }
    }

    
Set the immediate super user workgroup id field

Parameters:
suWorkgroupId the super user workgroup id
    public void setSuperUserWorkgroupIdNoInheritence(String suWorkgroupId) {
        this. = suWorkgroupId;
    }

    
Returns true if this DocumentType has a super user group defined.
    public boolean isSuperUserGroupDefined() {
        if (this. == null) {
            return getParentDocType() != null && getParentDocType().isSuperUserGroupDefined();
        }
        return true;
    }
    public DocumentType getPreviousVersion() {
    }
        if (StringUtils.isBlank()) {
            return null;
        }
    }
    public void setBlanketApproveWorkgroup(Group blanketApproveWorkgroup) {
        this. = null;
        if (ObjectUtils.isNotNull(