Class BeCPGJSONConversionComponent

java.lang.Object
org.alfresco.repo.jscript.app.JSONConversionComponent
fr.becpg.repo.jscript.app.BeCPGJSONConversionComponent

public class BeCPGJSONConversionComponent extends org.alfresco.repo.jscript.app.JSONConversionComponent

BeCPGJSONConversionComponent class.

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

    Fields
    Modifier and Type
    Field
    Description
    protected final Map<org.alfresco.service.namespace.QName,AssociationDecorator>
    Registered decorators
     
    private static final String
    Constant CREATE_CHILDREN="CreateChildren"
    private static final org.apache.commons.logging.Log
    Constant logger
    private static final String
    Constant REPORT_DOWNLOAD_API_URL="becpg/report/node/{0}/{1}/{2}/content/{"{trunked}
     

    Fields inherited from class org.alfresco.repo.jscript.app.JSONConversionComponent

    contentService, fileFolderService, lockService, mimetypeService, namespacePrefixCache, namespaceService, nodeService, permissionService, propertyDecorators, publicServiceAccessService, userPermissions
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.json.simple.JSONObject
    associationsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean useShortQNames)
    associationsToJSON.
    private String
    qnameToString(org.alfresco.service.namespace.QName qname, boolean isShortName)
    Convert a qname to a string - either full or short prefixed named.
    void
    Register a property decorator;
    void
    Setter for the field associationService.
    void
    Setter for the field securityService.
    toJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean useShortQNames)
    Convert a node reference to a JSON string.
    protected org.json.simple.JSONObject
    userPermissionsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef)

    Methods inherited from class org.alfresco.repo.jscript.app.JSONConversionComponent

    allSetPermissionsToJSON, apsectsToJSON, permissionsToJSON, propertiesToJSON, propertyToJSON, registerPropertyDecorator, setContentService, setFileFolderService, setLockService, setMimetypeService, setNamespaceService, setNodeService, setPermissionService, setPublicServiceAccessService, setRootValues, setUserPermissions, toJSONObject

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CREATE_CHILDREN

      private static final String CREATE_CHILDREN
      Constant CREATE_CHILDREN="CreateChildren"
      See Also:
    • associationService

      private AssociationService associationService
    • securityService

      private SecurityService securityService
    • REPORT_DOWNLOAD_API_URL

      private static final String REPORT_DOWNLOAD_API_URL
      Constant REPORT_DOWNLOAD_API_URL="becpg/report/node/{0}/{1}/{2}/content/{"{trunked}
      See Also:
    • logger

      private static final org.apache.commons.logging.Log logger
      Constant logger
    • associationDecorators

      protected final Map<org.alfresco.service.namespace.QName,AssociationDecorator> associationDecorators
      Registered decorators
  • Constructor Details

    • BeCPGJSONConversionComponent

      public BeCPGJSONConversionComponent()
  • Method Details

    • setSecurityService

      public void setSecurityService(SecurityService securityService)

      Setter for the field securityService.

      Parameters:
      securityService - a SecurityService object.
    • setAssociationService

      public void setAssociationService(AssociationService associationService)

      Setter for the field associationService.

      Parameters:
      associationService - a AssociationService object.
    • registerAssociationDecorator

      public void registerAssociationDecorator(AssociationDecorator associationDecorator)
      Register a property decorator;
      Parameters:
      associationDecorator - a AssociationDecorator object.
    • toJSON

      public String toJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean useShortQNames)
      Convert a node reference to a JSON string. Selects the correct converter based on selection implementation.
      Overrides:
      toJSON in class org.alfresco.repo.jscript.app.JSONConversionComponent
    • associationsToJSON

      protected org.json.simple.JSONObject associationsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean useShortQNames)

      associationsToJSON.

      Parameters:
      nodeRef - a NodeRef object.
      useShortQNames - a boolean.
      Returns:
      a JSONObject object.
    • qnameToString

      private String qnameToString(org.alfresco.service.namespace.QName qname, boolean isShortName)
      Convert a qname to a string - either full or short prefixed named.
      Parameters:
      qname - a QName object
      isShortName - a boolean
      Returns:
      a String object
    • userPermissionsToJSON

      protected org.json.simple.JSONObject userPermissionsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Overrides:
      userPermissionsToJSON in class org.alfresco.repo.jscript.app.JSONConversionComponent