Class BecpgFormServiceImpl

java.lang.Object
fr.becpg.repo.form.impl.BecpgFormServiceImpl
All Implemented Interfaces:
BecpgFormService, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class BecpgFormServiceImpl extends Object implements BecpgFormService, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean

BecpgFormServiceImpl class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • applicationContext

      org.springframework.context.ApplicationContext applicationContext
    • resourceBundles

      List<String> resourceBundles
    • configs

      List<String> configs
    • decorators

      List<ColumnDecorator> decorators
    • formService

      org.alfresco.repo.forms.FormService formService
    • nodeService

      private org.alfresco.service.cmr.repository.NodeService nodeService
    • namespaceService

      private org.alfresco.service.namespace.NamespaceService namespaceService
    • shareFormParser

      private ShareFormParser shareFormParser
    • logger

      private static org.apache.commons.logging.Log logger
    • definitions

    • PREFIX_FILE

      private static final String PREFIX_FILE
      See Also:
    • WILDCARD

      private static final String WILDCARD
      See Also:
  • Constructor Details

    • BecpgFormServiceImpl

      public BecpgFormServiceImpl()
  • Method Details

    • getFormService

      public org.alfresco.repo.forms.FormService getFormService()

      Getter for the field formService.

      Returns:
      a FormService object.
    • setDecorators

      public void setDecorators(List<ColumnDecorator> decorators)

      Setter for the field decorators.

      Parameters:
      decorators - a List object.
    • setFormService

      public void setFormService(org.alfresco.repo.forms.FormService formService)

      Setter for the field formService.

      Parameters:
      formService - a FormService object.
    • getNodeService

      public org.alfresco.service.cmr.repository.NodeService getNodeService()

      Getter for the field nodeService.

      Returns:
      a NodeService object.
    • setNodeService

      public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)

      Setter for the field nodeService.

      Parameters:
      nodeService - a NodeService object.
    • getNamespaceService

      public org.alfresco.service.namespace.NamespaceService getNamespaceService()

      Getter for the field namespaceService.

      Returns:
      a NamespaceService object.
    • setNamespaceService

      public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)

      Setter for the field namespaceService.

      Parameters:
      namespaceService - a NamespaceService object.
    • getShareFormParser

      public ShareFormParser getShareFormParser()

      Getter for the field shareFormParser.

      Returns:
      a ShareFormParser object.
    • setShareFormParser

      public void setShareFormParser(ShareFormParser shareFormParser)

      Setter for the field shareFormParser.

      Parameters:
      shareFormParser - a ShareFormParser object.
    • setConfigs

      public void setConfigs(List<String> configs)

      Setter for the field configs.

      Parameters:
      configs - a List object.
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • registerDecorator

      public void registerDecorator(ColumnDecorator columnDecorator)

      registerDecorator.

      Specified by:
      registerDecorator in interface BecpgFormService
      Parameters:
      columnDecorator - a ColumnDecorator object
    • reloadConfig

      public void reloadConfig() throws IOException

      reloadConfig.

      Specified by:
      reloadConfig in interface BecpgFormService
      Throws:
      IOException - if any.
    • getForm

      public BecpgFormDefinition getForm(String itemKind, String itemId, String formId, String siteId, List<String> fields, List<String> forcedFields, org.alfresco.service.cmr.repository.NodeRef entityNodeRef) throws BeCPGException, org.json.JSONException

      getForm.

      Specified by:
      getForm in interface BecpgFormService
      Parameters:
      itemKind - a String object
      itemId - a String object
      formId - a String object
      siteId - a String object
      fields - a List object
      forcedFields - a List object
      entityNodeRef - a NodeRef object
      Returns:
      a BecpgFormDefinition object
      Throws:
      BeCPGException - if any.
      org.json.JSONException - if any.
    • parseDefinitions

      private Map<String,Map<String,BecpgFormDefinition>> parseDefinitions(String customFormDefinition) throws org.json.JSONException
      Throws:
      org.json.JSONException
    • getFormDefinition

      private BecpgFormDefinition getFormDefinition(Map<String,Map<String,BecpgFormDefinition>> defs, org.alfresco.repo.forms.Item item, String formId, String siteId) throws BeCPGException
      Throws:
      BeCPGException
    • processWildcards

      private List<String> processWildcards(List<String> configs)
    • processWildcard

      private List<String> processWildcard(String sourceString)
    • guessSeparator

      private char guessSeparator(String sourceString)