Package it.eng.spago.configuration

Examples of it.eng.spago.configuration.ConfigSingleton


   *
   * @return The current SpagoBI version
   */
  public String getCurrentVersion() {
    logger.debug("IN");
    ConfigSingleton conf = ConfigSingleton.getInstance();
    SourceBean curVerSB = (SourceBean) conf.getAttribute("IMPORTEXPORT.CURRENTVERSION");
    String curVer = (String) curVerSB.getAttribute("version");
    logger.debug("OUT");
    return curVer;
  }
View Full Code Here


   * @return List of the roles (list of it it.eng.spagobi.bo.Role)
   */
  public List getRoles() {
        logger.debug("IN");
    List roles = new ArrayList();
    ConfigSingleton config = ConfigSingleton.getInstance();
    List sb_roles = config.getAttributeAsList("AUTHORIZATIONS.ENTITIES.ROLES.ROLE");
    Iterator iter_sb_roles = sb_roles.iterator();
    while(iter_sb_roles.hasNext()) {
      SourceBean roleSB = (SourceBean)iter_sb_roles.next();
      String roleName = (String)roleSB.getAttribute("roleName");
      String roleDescription = (String)roleSB.getAttribute("description");
View Full Code Here

   * @return the list of names of all attributes of all profiles defined
   */
  public List getAllProfileAttributesNames() {
        logger.debug("IN");
    List attributes = new ArrayList();
    ConfigSingleton config = ConfigSingleton.getInstance();
    List sb_attributes = config.getAttributeAsList("AUTHORIZATIONS.ENTITIES.ATTRIBUTES.ATTRIBUTE");
    Iterator iter_sb_attributes = sb_attributes.iterator();
    while(iter_sb_attributes.hasNext()) {
      SourceBean attributeSB = (SourceBean)iter_sb_attributes.next();
      String attribute = (String)attributeSB.getAttribute("name");
      logger.debug("ADD: attribute="+attribute);
View Full Code Here

  String documentId = biobj.getId().toString();
  pars.put("document", documentId);
  logger.debug("Add document parameter:" + documentId);

  // retrieving the date format
  ConfigSingleton config = ConfigSingleton.getInstance();
  SourceBean formatSB = (SourceBean) config.getAttribute("DATA-ACCESS.DATE-FORMAT");
  String format = (formatSB == null) ? "DD-MM-YYYY" : (String) formatSB.getAttribute("format");
  pars.put("dateformat", format);
  pars = addBIParameters(biobj, pars);
  pars = addBIParameterDescriptions(biobj, pars);
  logger.debug("OUT");
View Full Code Here

* @version 1.0
*/
public class Configurator {
    private Configurator() {
      ConfigSingleton config = ConfigSingleton.getInstance();
      _parameterConnectionPoolDescriptors = new HashMap();
      _parameterRegisteredConnectionPoolNames = new ArrayList();
      SourceBean dataAccess = (SourceBean)config.getAttribute(DATA_ACCESS);
     
      List connectionPools = dataAccess.getAttributeAsList("CONNECTION-POOL");
      ConnectionPoolDescriptor connectionPoolDescriptor = null;
      SourceBean connectionPool = null;
      List poolParameters = null;
View Full Code Here

   
    private Map applyLocale(Map map) {
      logger.debug("IN");
     
    ConfigSingleton config = ConfigSingleton.getInstance();
    Locale portalLocale = null;
    try {
      portalLocale =  PortletUtilities.getPortalLocale();
      logger.debug("Portal locale: " + portalLocale);
    } catch (Exception e) {
        logger.warn("Error while getting portal locale.");
        portalLocale = MessageBuilder.getBrowserLocaleFromSpago();
        logger.debug("Spago locale: " + portalLocale);
    }
   
    SourceBean languageSB = null;
    if(portalLocale != null && portalLocale.getLanguage() != null) {
      languageSB = (SourceBean)config.getFilteredSourceBeanAttribute("SPAGOBI.LANGUAGE_SUPPORTED.LANGUAGE",
          "language", portalLocale.getLanguage());
    }
   
    if(languageSB != null) {
      map.put("country", (String)languageSB.getAttribute("country"));
View Full Code Here

    }

    private Map applyLocale(Map map) {
  logger.debug("IN");

  ConfigSingleton config = ConfigSingleton.getInstance();
  Locale portalLocale = null;
  try {
      portalLocale = PortletUtilities.getPortalLocale();
      logger.debug("Portal locale: " + portalLocale);
  } catch (Exception e) {
      logger.error("Error while getting portal locale.");
      portalLocale = MessageBuilder.getBrowserLocaleFromSpago();
      logger.debug("Spago locale: " + portalLocale);
  }

  SourceBean languageSB = null;
  if (portalLocale != null && portalLocale.getLanguage() != null) {
      languageSB = (SourceBean) config.getFilteredSourceBeanAttribute("SPAGOBI.LANGUAGE_SUPPORTED.LANGUAGE",
        "language", portalLocale.getLanguage());
  }

  if (languageSB != null) {
      map.put(COUNTRY, (String) languageSB.getAttribute("country"));
View Full Code Here

 
  public static String getExportTempFolderPath() {
    logger.debug("IN");
    String toReturn = null;
    try {
        ConfigSingleton conf = ConfigSingleton.getInstance();
        SourceBean importerSB = (SourceBean) conf.getAttribute("IMPORTEXPORT.EXPORTER");
        toReturn = (String) importerSB.getAttribute("exportFolder");
        toReturn = GeneralUtilities.checkForSystemProperty(toReturn);
        if (!toReturn.startsWith("/") && toReturn.charAt(1) != ':') {
          String root = ConfigSingleton.getRootPath();
          toReturn = root + "/" + toReturn;
View Full Code Here

 
  public static IExportManager getExportManagerInstance() throws Exception {
    logger.debug("IN");
    IExportManager toReturn = null;
    try {
        ConfigSingleton conf = ConfigSingleton.getInstance();
        SourceBean exporterSB = (SourceBean) conf.getAttribute("IMPORTEXPORT.EXPORTER");
        String expClassName = (String) exporterSB.getAttribute("class");
        Class expClass = Class.forName(expClassName);
        toReturn = (IExportManager) expClass.newInstance();
    } catch (Exception e) {
      logger.error("Error while instantiating export manager", e);
View Full Code Here

    private String getStandardHierarchy() {
  logger.debug("IN");
  // load a xml file
  StringBuffer buffer = new StringBuffer();
  ConfigSingleton config = ConfigSingleton.getInstance();
  SourceBean pathSB = (SourceBean) config.getAttribute(DOCUMENT_PATH_NAME);
  String path = (String) pathSB.getAttribute("path");

  String baseTemplateFileStr = ConfigSingleton.getRootPath() + path + "/" + DOCUMENT_FILE_NAME;
  File baseFile = null;
  if (baseTemplateFileStr != null)
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.