Package it.eng.spago.configuration

Examples of it.eng.spago.configuration.ConfigSingleton


                    classErr.getName(),
                    nameMeth,
                    message);
  }
  public static  Pattern getFilterPattern(){
    ConfigSingleton config = ConfigSingleton.getInstance();
    debug(SecurityProviderUtilities.class, "init", "Spago configuration retrived ");
    SourceBean secFilterSB = (SourceBean)config.getAttribute("SPAGOBI.SECURITY.ROLE-NAME-PATTERN-FILTER");
    debug(SecurityProviderUtilities.class, "init", "source bean filter retrived " + secFilterSB);
        String rolePatternFilter = secFilterSB.getCharacters();
        debug(SecurityProviderUtilities.class, "init", "filter string retrived " + rolePatternFilter);
        Pattern pattern = Pattern.compile(rolePatternFilter);
        debug(SecurityProviderUtilities.class, "init", "regular expression pattern compiled " + pattern);
View Full Code Here


    /**
     * Instantiates a new authorizations business mapper.
     */
    public AuthorizationsBusinessMapper() {
  logger.debug("IN");
  ConfigSingleton config = ConfigSingleton.getInstance();
  _mapActions = new HashMap();
  List actions =config.getAttributeAsList("BUSINESS_MAP.MAP_ACTIONS");
  Iterator it = actions.iterator();
  while (it.hasNext()) {
      SourceBean mapActions = (SourceBean) it.next();
      List actionsList =mapActions.getAttributeAsList("MAP_ACTION");
      Iterator actionListIt = actionsList.iterator();
      while (actionListIt.hasNext()) {
    SourceBean mapAction = (SourceBean) actionListIt.next();
            String actionName = (String) mapAction.getAttribute("actionName");
            String businessProcessName = (String) mapAction.getAttribute("businessProcess");
            String actStr = "ACTION[" + actionName + "]";
            logger.debug("PUT:actStr"+actStr);
            _mapActions.put(actStr.toUpperCase(), businessProcessName);
      }
  }
  _mapPages = new HashMap();
  _mapPagesModules = new HashMap();
  List pageModules = config.getAttributeAsList("BUSINESS_MAP.MAP_PAGE_MODULES");
  it = pageModules.iterator();
  while (it.hasNext()) {
      SourceBean mapPageModules = (SourceBean) it.next();
      List mapPageModuleList =mapPageModules.getAttributeAsList("MAP_PAGE_MODULE");
      Iterator mapPageModuleListIt = mapPageModuleList.iterator();
View Full Code Here

    logger.debug("IN");
    FileOutputStream fos = null;
    try {
      String propFilePath = pathBaseFolder + "/export.properties";
      fos = new FileOutputStream(propFilePath);
      ConfigSingleton config = ConfigSingleton.getInstance();
      SourceBean currentVersionSB = (SourceBean) config.getAttribute("IMPORTEXPORT.CURRENTVERSION");
      String version = (String) currentVersionSB.getAttribute("version");
      String properties = "spagobi-version=" + version + "\n";
      fos.write(properties.getBytes());
      fos.flush();
      fos.close();
View Full Code Here

     *
     * @throws SecurityException the security exception
     */
    public void validateTicket(String ticket, String userId)throws SecurityException {
  logger.debug("IN");
  ConfigSingleton config = ConfigSingleton.getInstance();
  String validateUrl=null;
  String validateService=null;
  if (config!=null){
    // only server side...
    validateUrl = SingletonConfig.getInstance().getConfigValue("CAS_SSO.VALIDATE-USER.URL");
View Full Code Here

   * @param resource addres of the resource ro be verified
   */  

  public static boolean resourceExists(String currTheme, String resource){
    logger.debug("IN");
    ConfigSingleton config = ConfigSingleton.getInstance();
    String rootPath=config.getRootPath();
    logger.debug("rootPath="+rootPath);
    String urlByTheme=resource;
    resource.trim();
    if(resource.startsWith("/"))
      resource=resource.substring(1);
View Full Code Here

   * @param spagoBIContext   the name of the context
   */  

  public static boolean resourceExistsInTheme(String resource, String spagoBIContext){
    logger.debug("IN");
    ConfigSingleton config = ConfigSingleton.getInstance();
    String rootPath=config.getRootPath();
    String urlByTheme=resource;
    resource.trim();

    if(spagoBIContext!=null && resource.startsWith(spagoBIContext)){
      int sizeToRemove=spagoBIContext.length();
View Full Code Here

     * @throws EMFUserError the EMF user error
     */
    public byte[] applyTransformations(byte[] impArchive, String archiveName, String pathImpTmpFolder)
      throws EMFUserError {
  logger.debug("IN");
  ConfigSingleton conf = ConfigSingleton.getInstance();
  try {
      decompressArchive(pathImpTmpFolder, archiveName, impArchive);
  } catch (Exception e) {
      logger.error( "Error while decompressing exported archive " , e);
  }
  String archiveNameWithoutExtension = archiveName.substring(0, archiveName.lastIndexOf('.'));
  String currVersion = getCurrentVersion();
  String expVersion = "";
  try {
      expVersion = getExportVersion(pathImpTmpFolder, archiveNameWithoutExtension);
  } catch (Exception e) {
      logger.error( "Error while getting version name of the exporting system " , e);
  }
  // erase tmp folder
  File fileTmpDir = new File(pathImpTmpFolder);
  GeneralUtilities.deleteContentDir(fileTmpDir);
  // if the exported version is equal to the current the archive has not
  // to be transformed
  if (currVersion.trim().equalsIgnoreCase(expVersion.trim())) {
      return impArchive;
  }
  // read transformer class from configuration
  List transClassName = new ArrayList();
  List transList = conf.getAttributeAsList("IMPORTEXPORT.TRANSFORMERS.TRANSFORM");
  fillListTransClassName(transList, expVersion, transClassName);
  // instance all transformer
  Iterator iterTrans = transClassName.iterator();
  while (iterTrans.hasNext()) {
      String className = (String) iterTrans.next();
View Full Code Here

     *
     * @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

    private File getFileOfAssRepDir() {
  logger.debug("IN");
  File assrepdirFile = null;
  try {
    ConfigSingleton conf = ConfigSingleton.getInstance();
    SourceBean assRepo = (SourceBean)conf.getAttribute("IMPORTEXPORT.ASSOCIATIONS_REPOSITORY");
    String assRepoPath = (String)assRepo.getAttribute("path");
    if(!assRepoPath.startsWith("/")){
      String pathcont = ConfigSingleton.getRootPath();
      assRepoPath = pathcont + "/" + assRepoPath;
    }
View Full Code Here

   * @param moduleName the module name
   */
  public static void clearSession(SessionContainer session, String moduleName){
   
    // clear all input parameters
    ConfigSingleton spagoBiConfig = ConfigSingleton.getInstance();
    // TODO patch this
    SourceBean moduleConfig = (SourceBean)spagoBiConfig.getFilteredSourceBeanAttribute("MODULES.MODULE", "NAME", moduleName);
    List parametersList = null;
    SourceBean parameter = null;
    String pvalue, str;
   
    parametersList = moduleConfig.getAttributeAsList("QUERIES.SELECT_QUERY.PARAMETER");   
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.