Class OlapServiceImpl

java.lang.Object
fr.becpg.repo.olap.impl.OlapServiceImpl
All Implemented Interfaces:
OlapService

@Service("olapService") public class OlapServiceImpl extends Object implements OlapService

OlapServiceImpl class.

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

    • ROW_HEADER

      private static final String ROW_HEADER
      See Also:
    • logger

      private static final org.apache.commons.logging.Log logger
    • olapPublicUrl

      @Value("${becpg.olap.url.public}") private String olapPublicUrl
    • olapServerUrl

      @Value("${becpg.olap.url.internal}") private String olapServerUrl
    • enabled

      @Value("${becpg.olap.enabled}") private Boolean enabled
    • fileFolderService

      @Autowired private org.alfresco.service.cmr.model.FileFolderService fileFolderService
    • contentService

      @Autowired private org.alfresco.service.cmr.repository.ContentService contentService
    • repoService

      @Autowired private RepoService repoService
    • beCPGTicketService

      @Autowired private BeCPGTicketService beCPGTicketService
  • Constructor Details

    • OlapServiceImpl

      public OlapServiceImpl()
  • Method Details

    • retrieveOlapCharts

      public List<OlapChart> retrieveOlapCharts()

      retrieveOlapCharts.

      Specified by:
      retrieveOlapCharts in interface OlapService
      Returns:
      a List object.
    • getOlapQueriesFolder

      public org.alfresco.service.cmr.repository.NodeRef getOlapQueriesFolder()

      getOlapQueriesFolder.

      Specified by:
      getOlapQueriesFolder in interface OlapService
      Returns:
      a NodeRef object.
    • retrieveOlapChartsFromSaiku

      public List<OlapChart> retrieveOlapChartsFromSaiku() throws IOException, org.json.JSONException

      retrieveOlapChartsFromSaiku.

      Specified by:
      retrieveOlapChartsFromSaiku in interface OlapService
      Returns:
      a List object.
      Throws:
      IOException - if any.
      org.json.JSONException - if any.
    • retrieveChartData

      public OlapChartData retrieveChartData(String olapQueryId) throws IOException

      retrieveChartData.

      Parse [ [{"value":"null","properties":{},"type":"COLUMN_HEADER"},{"value": "Oct","properties":{},"type":"COLUMN_HEADER"}] ,[{"value":"Type","properties":{"levelindex":"0"} ,"type":"ROW_HEADER_HEADER"} ,{"value":"Week41/2011","properties":{"levelindex" :"1","dimension":"Date de modification" },"type":"COLUMN_HEADER"}],[{"value" :"finishedProduct","properties":{"levelindex" :"0","dimension":"Type de produit" },"type":"ROW_HEADER"},{"value":"10","properties" :null,"type":"DATA_CELL"} ],[{"value":"rawMaterial","properties":{"levelindex" :"0","dimension":"Type de produit" },"type":"ROW_HEADER"},{"value":"14","properties" :null,"type":"DATA_CELL"}]]
      Specified by:
      retrieveChartData in interface OlapService
      Parameters:
      olapQueryId - a String object.
      Returns:
      a OlapChartData object.
      Throws:
      IOException - if any.
    • getSSOUrl

      public String getSSOUrl()

      getSSOUrl.

      Specified by:
      getSSOUrl in interface OlapService
      Returns:
      a String object.
    • getOlapChart

      private OlapChart getOlapChart(String olapQueryId)
    • retrieveDataType

      private String retrieveDataType(String value)
    • buildDataUrl

      private String buildDataUrl(String olapQueryId, OlapContext context) throws org.apache.commons.httpclient.URIException
      Throws:
      org.apache.commons.httpclient.URIException
    • buildCreateQueryUrl

      private String buildCreateQueryUrl(String olapQueryId, OlapContext context) throws org.apache.commons.httpclient.URIException
      Throws:
      org.apache.commons.httpclient.URIException
    • buildRepositoryUrl

      private String buildRepositoryUrl(OlapContext context) throws org.apache.commons.httpclient.URIException
      Throws:
      org.apache.commons.httpclient.URIException
    • buildQueryUrl

      private String buildQueryUrl(String queryName, OlapContext context) throws org.apache.commons.httpclient.URIException
      Throws:
      org.apache.commons.httpclient.URIException