Package it.eng.spago.configuration

Examples of it.eng.spago.configuration.ConfigSingleton


    msgBuilder = MessageBuilderFactory.getMessageBuilder();

      currTheme=ThemesManager.getCurrentTheme(_requestContainer);
      if(currTheme==null)currTheme=ThemesManager.getDefaultTheme();
   
    ConfigSingleton configure = ConfigSingleton.getInstance();
    if (_actionName != null) {
      _serviceName = _actionName;
      _content = _serviceResponse;
      SourceBean actionBean =
        (SourceBean) configure.getFilteredSourceBeanAttribute("ACTIONS.ACTION", "NAME", _actionName);
      _layout = (SourceBean) actionBean.getAttribute("CONFIG");
      if (_layout == null) {
        // if the layout is dinamically created it is an attribute of the response
        _layout = (SourceBean) _serviceResponse.getAttribute("CONFIG");
      }
      _providerURL = "ACTION_NAME=" + _actionName + "&";
      _providerUrlMap.put("ACTION_NAME", _actionName);
      HashMap params = (HashMap) _serviceResponse.getAttribute("PARAMETERS_MAP");
      if (params != null) {
        _paramsMap = params;
        _providerUrlMap.putAll(_paramsMap);
      }
    }
    else if (_moduleName != null) {
      _serviceName = _moduleName;
      SpagoBITracer.debug("Admintools", "ListTag", "doStartTag", " Module Name: " + _moduleName);
      _content = (SourceBean) _serviceResponse.getAttribute(_moduleName);
      SourceBean moduleBean =
        (SourceBean) configure.getFilteredSourceBeanAttribute("MODULES.MODULE", "NAME", _moduleName);
     
      if(moduleBean!=null) SpagoBITracer.debug("Admintools", "ListTag", "doStartTag", _moduleName + " configuration loaded");
      _layout = (SourceBean) moduleBean.getAttribute("CONFIG");
      if (_layout == null) {
        // if the layout is dinamically created it is an attribute of the response
View Full Code Here


      ArrayList roles = new ArrayList();
      HashMap userAttributes = new HashMap();
      PortalContainer container = PortalContainer.getInstance();

      if (container == null) {
    ConfigSingleton config = ConfigSingleton.getInstance();
    SourceBean securityconfSB = (SourceBean) config
      .getAttribute("SPAGOBI.SECURITY.PORTAL-SECURITY-CLASS.CONFIG");
    String paramCont = "NAME_PORTAL_APPLICATION";
    SecurityProviderUtilities.debug(this.getClass(), "<init(Principal)>", " Use param " + paramCont);
    SourceBean paramContSB = (SourceBean) securityconfSB.getAttribute(paramCont);
    SecurityProviderUtilities.debug(this.getClass(), "<init(Principal)>",
View Full Code Here

  public boolean validate(String serviceType, String serviceName, RequestContextIFace context)  {
    RequestContainer requestContainer = context.getRequestContainer();
    ResponseContainer responseContainer = context.getResponseContainer();
    _serviceName = serviceName;
    _serviceType = serviceType;
    ConfigSingleton config = ConfigSingleton.getInstance();
   
    Object objServices = config.getFilteredSourceBeanAttribute(
        ValidatorLocator.VALIDATION_CONFIG_HEADER,
        ValidatorLocator.VALIDATION_SERVICE_NAME, _serviceName);
   
    if (objServices instanceof SourceBean)
      _serviceValidations = (SourceBean) objServices;
View Full Code Here

   * @param serviceType The type of the service (PAGE; ACTION)
   */
  public BIObjectValidator(String serviceName, String serviceType) {
    _serviceName = serviceName;
    _serviceType = serviceType;
    ConfigSingleton config = ConfigSingleton.getInstance();
   
    Object objServices = config.getFilteredSourceBeanAttribute(
        ValidatorLocator.VALIDATION_CONFIG_HEADER,
        ValidatorLocator.VALIDATION_SERVICE_NAME, _serviceName);
   
    if (objServices instanceof SourceBean)
      _serviceValidations = (SourceBean) objServices;
View Full Code Here

   * @return PrivateKey DSA alghoritm for SpagoBI
   */
  public PrivateKey getPrivateKeyDSA() {
    PrivateKey privKey = null;
    // get config singleton
    ConfigSingleton conf = ConfigSingleton.getInstance();
      // get the name of the spagobi private key
      SourceBean nameSbiPrivKeySB = (SourceBean)conf.getAttribute("SPAGOBI.SERVICE_SECURITY.SPAGOBI_PRIVATE_KEY_DSA");
      String logicalName = nameSbiPrivKeySB.getCharacters();
    // get the input stream of the key file
      InputStream privKeyIs = this.getClass().getClassLoader().getResourceAsStream(logicalName);     
      try {
           ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

   *
   * @see it.eng.spago.dispatching.action.AbstractHttpAction#service(it.eng.spago.base.SourceBean, it.eng.spago.base.SourceBean)
   */
  public void service(SourceBean request, SourceBean response) throws Exception {
    String viewCode = (String)request.getAttribute("viewCode");
    ConfigSingleton configuration = ConfigSingleton.getInstance();
    SourceBean viewSB = (SourceBean)configuration.getFilteredSourceBeanAttribute("MENU.VIEW", "code", viewCode);
    List containers = viewSB.getAttributeAsList("CONTAINERS.CONTAINER");
    String widthViewStr = (String)viewSB.getAttribute("width");
    Integer widthView = new Integer(widthViewStr);
    String heightViewStr = (String)viewSB.getAttribute("height");
    Integer heightView = new Integer(heightViewStr);
View Full Code Here

   
    _session = _requestContainer.getSessionContainer();
   
    _serviceResponse = _responseContainer.getServiceResponse();
    ConfigSingleton configure = ConfigSingleton.getInstance();
    if (_actionName != null) {
      _serviceName = _actionName;
      _content = _serviceResponse;
      SourceBean actionBean =
        (SourceBean) configure.getFilteredSourceBeanAttribute("ACTIONS.ACTION", "NAME", _actionName);
      _layout = (SourceBean) actionBean.getAttribute("CONFIG");
      if (_layout == null) {
        // if the layout is dinamically created it is an attribute of the response
        _layout = (SourceBean) _serviceResponse.getAttribute("CONFIG");
      }
      _providerURL = "ACTION_NAME=" + _actionName + "&";
      _providerUrlMap.put("ACTION_NAME", _actionName);
      HashMap params = (HashMap) _serviceResponse.getAttribute("PARAMETERS_MAP");
      if (params != null) {
        _paramsMap = params;
        _providerUrlMap.putAll(_paramsMap);
      }
    } // if (_actionName != null)
    else if (_moduleName != null) {
      _serviceName = _moduleName;
      SpagoBITracer.debug("Admintools", "ListTag", "doStartTag", " Module Name: " + _moduleName);
      _content = (SourceBean) _serviceResponse.getAttribute(_moduleName);
      SourceBean moduleBean =
        (SourceBean) configure.getFilteredSourceBeanAttribute("MODULES.MODULE", "NAME", _moduleName);
     
      if(moduleBean!=null) SpagoBITracer.debug("Admintools", "ListTag", "doStartTag", _moduleName + " configuration loaded");
      _layout = (SourceBean) moduleBean.getAttribute("CONFIG");
      if (_layout == null) {
        // if the layout is dinamically created it is an attribute of the response
View Full Code Here

      fosTemplate.flush();
      fosTemplate.close();
      logger.debug("Dossier template content written into a temp file.");

      // initialize openoffice environment
      ConfigSingleton config = ConfigSingleton.getInstance();
      SourceBean officeConnectSB = (SourceBean) config.getAttribute("DOSSIER.OFFICECONNECTION");
      logger.debug("Office connection Sourcebean retrieved: " + officeConnectSB.toXML());
      String host = (String) officeConnectSB.getAttribute("host");
      String port = (String) officeConnectSB.getAttribute("port");
      logger.debug("Office connection host: " + host);
      logger.debug("Office connection port: " + port);
View Full Code Here

        setAnalyticalDriversValues(dossier, (Map) contextInstance.getVariable(DossierConstants.DOSSIER_PARAMETERS));
        logger.debug("Dossier variable retrived " + dossier);
        dossierDAO = DAOFactory.getDossierDAO();
        pathTmpFold = dossierDAO.init(dossier);
        logger.debug("Using tmp folder path " + pathTmpFold);
        ConfigSingleton config = ConfigSingleton.getInstance();
        tempDir = new File(pathTmpFold);
        logger.debug("Create tmp folders " + tempDir);
 
        // GETS OO TEMPLATE AND WRITE IT INTO THE TMP DIRECTORY
        String templateFileName = dossierDAO.getPresentationTemplateFileName(pathTmpFold);
        logger.debug("dossier oo template name retrived " + templateFileName);
        InputStream contentTempIs = null;
        byte[] contentTempBytes = null;
        try {
          contentTempIs = dossierDAO.getPresentationTemplateContent(pathTmpFold);
          logger.debug("dossier oo template input stream retrived " + contentTempIs);
          contentTempBytes = GeneralUtilities.getByteArrayFromInputStream(contentTempIs);
          logger.debug("dossier oo template bytes retrived ");
        } finally {
          if (contentTempIs != null) contentTempIs.close();
        }
        // write template content into a temp file
        File templateOOFile = new File(tempDir, templateFileName);
        FileOutputStream fosTemplate = new FileOutputStream(templateOOFile);
        fosTemplate.write(contentTempBytes);
        logger.debug("oo template bytes written into a tmp file ");
        fosTemplate.flush();
        fosTemplate.close();
 
        // INITIALIZE OFFICE ENVIRONMENT
        SourceBean officeConnectSB = (SourceBean) config.getAttribute("DOSSIER.OFFICECONNECTION");
        if (officeConnectSB == null) {
          logger.error("Cannot found sourcebean DOSSIER.OFFICECONNECTION into configuration");
          throw new Exception("Cannot found sourcebean DOSSIER.OFFICECONNECTION into configuration");
        } else {
          logger.debug("Dossier office connection sourcebean retrived " + officeConnectSB);
View Full Code Here

    List objects = folder.getBiObjects();
    for (Iterator it = objects.iterator(); it.hasNext();) {
        BIObject obj = (BIObject) it.next();
        Engine engine = obj.getEngine();
        String objTypeCode = obj.getBiObjectTypeCode();
        ConfigSingleton config = ConfigSingleton.getInstance();
        SourceBean technologyFilterSB = (SourceBean) config
          .getAttribute(DossierConstants.DOSSIER_DRIVER_FILTER_SB);
        String technologyFilter = (String) technologyFilterSB.getAttribute("match");
        if (objTypeCode.equalsIgnoreCase(SpagoBIConstants.REPORT_TYPE_CODE)
          && engine.getDriverName().toLowerCase().indexOf(technologyFilter) != -1) {
      htmlStream.append("  treeCMS.add(" + dTreeObjects-- + ", " + idFolder + ",'" + obj.getName()
View Full Code Here

TOP

Related Classes of it.eng.spago.configuration.ConfigSingleton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.