Package de.innovationgate.webgate.api

Examples of de.innovationgate.webgate.api.WGDatabase.openSession()


           
            WGDatabase db = (WGDatabase) jobContext.getWgaCore().getContentdbs().get(dbkey);
            if (db == null) {
                throw new TaskException("Database of key " + dbkey + " not connected");
            }
            db.openSession();
           
            String fileName = getOption("filename");
            file = new File(fileName);
            if (!file.exists()) {
                throw new TaskException("Dump file does not exist :" + file.getPath());
View Full Code Here


           
            WGDatabase db = (WGDatabase) jobContext.getWgaCore().getContentdbs().get(dbkey);
            if (db == null) {
                throw new TaskException("Database of key " + dbkey + " not connected");
            }
            db.openSession();
           
            String filter = (String) getOption("filter");
            String fileName = (String) getOption("filename");
            if (fileName == null) {
                throw new TaskException("Option 'filename' not specified");
View Full Code Here

      boolean hasAccess = false;   
      database = (WGDatabase) dbs.next();
     
      if( database.hasFeature(WGDatabase.FEATURE_FULLCONTENTFEATURES)  ){
         
        database.openSession(username, password);
       
        if( database.isSessionOpen() ){     
          hasAccess = true; //wgaCore.isAuthor(database, pageContext.getRequest().getRemoteAddr(), LicenseManager.LICENSENAME_AUTHOR_BI);
        }   
     
View Full Code Here

        try {
                String taskDescr = "Anonymous TMLScript Master Function";
               
                // Open database in master thread
                WGDatabase db = _context.getdocument().getDatabase();
          db.openSession();
                db.getSessionContext().setTask(taskDescr);
               
                // Eventually open pers db too so profile is available
                TMLUserProfile profile = _context.getprofile();
               
View Full Code Here

                // Eventually open pers db too so profile is available
                TMLUserProfile profile = _context.getprofile();
               
                if (profile != null && !profile.getprofile().getDatabase().isSessionOpen()) {
                    WGDatabase persDB = profile.getprofile().getDatabase();
                    persDB.openSession();
                    persDB.getSessionContext().setTask(taskDescr);
                }
   
                RhinoContextAction contextAction = new RhinoContextAction(_context, _function, _overrideFunctionScope, _params);
                ExpressionResult result = (ExpressionResult) ContextFactory.getGlobal().call(contextAction);
View Full Code Here

                                    }
                                }
                            }
                        } else if (db.isConnected()) {
                            try {
                                db.openSession();
                                if (db.isSessionOpen()) {
                                    db.getSessionContext().setTask("ExternalFileServingMaintenanceTask");
                                    if (!db.isAnonymousAccessible()) {
                                        if (dbDirectory.exists()) {
                                            _core.getLog().info("Database '" + db.getDbReference() + "' is not accessible by anonymous users. Removing all cached entries from '" + dbDirectory.getAbsolutePath() + "'.");               
View Full Code Here

                if (!_core.isAdminLogin(session.getUsername(), session.getPassword(), request)) {
                    throw new WGAServiceException("Administrative login is invalid");
                }
               
                if (!db.isSessionOpen()) {
                  db.openSession();
                }
                return _core.prepareDB(db, null);
            }
           
           
View Full Code Here

                    if (db == null) {
                        _core.getLog().error("Cannot collect authentications from db '" + _dbkey + "' because the db is not connected");
                        return;
                    }
                   
                    db.openSession();
                    db.getSessionContext().setTask("CS Authentication Module - Login collection task");
                   
                    // Try to read configuration
                    readConfigurationProperties(db);
   
View Full Code Here

            }
            else {
                persDB = (WGDatabase) database.getAttribute(WGACore.DBATTRIB_EXTERNAL_SELF_PERSONALISATION_DB);
                if (persDB != null) {
                    if (!persDB.isSessionOpen()) {
                        persDB.openSession();
                    }
                }
                else {
                    return null;
                }
View Full Code Here

                    Long pluginFileTime = (Long) db.getAttribute(DBATTRIB_PLUGIN_FILETIME);
                    Version pluginVersion = (Version) db.getAttribute(DBATTRIB_PLUGIN_VERSION);
                    if (pluginVersion.equals(plugin.getPluginID().getVersion()) &&
                        (pluginFileTime != null && pluginFileTime.equals(new Long(plugin.getFileLastModified())))) {
                        if (!db.isSessionOpen()) {
                            db.openSession();
                        }
                        return db;
                    }
                    else {
                        removeContentDB(dbKey);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.