Package de.innovationgate.wgpublisher

Examples of de.innovationgate.wgpublisher.WGACore$TMLScriptGlobalRegistry


        }
    }
   
  protected String innerBuildHomepageURL(WGDatabase db, HttpServletRequest request) throws WGException {
        String homepage = (String) db.getAttribute(WGACore.DBATTRIB_HOME_PAGE);
        WGACore core = WGACore.retrieve(request.getSession().getServletContext());
        WGPDispatcher dispatcher = core.getDispatcher();
        // First try: if db homepage attribute set - redirect to homepage
        if (homepage != null && !homepage.trim().equals("")) {
             return dispatcher.getPublisherURL(request) + "/" + db.getDbReference().toLowerCase() + "/" + homepage;
        }

        // Try to find a document named "home" in the relevant languages
        db = core.openContentDB(db, request, false);
        if (db.isSessionOpen()) {
           
            LanguageBehaviour langBehaviour = LanguageBehaviourTools.retrieve(db);
            WGContent content = langBehaviour.requestSelectContentForName(db, request, "home", false);
            if (content != null && content.mayBePublished(false, WGContent.DISPLAYTYPE_NONE)) {
View Full Code Here


    private ModuleRegistry _registry;

    @Override
    public File getDatabaseDirectory() throws WGBackendException {
       
        WGACore wgaCore = (WGACore) _registry.getContextObjects().get(WGACore.class);
        File dir = new File(wgaCore.getWgaDataDir(), "#dbs");
        if (!dir.exists()) {
            if (!dir.mkdirs()) {
                throw new WGBackendException("Unable to create hsql default directory " + dir.getPath());
            }
        }
View Full Code Here

    public void injectRegistry(ModuleRegistry registry) {
        _registry = registry;
    }

    public void testAvailability(ModuleRegistry reg) throws ModuleAvailabilityException {
        WGACore core = (WGACore) reg.getContextObjects().get(WGACore.class);
        if (core == null) {
            throw new ModuleAvailabilityException("Cannot retrieve WGACore to test availability");
        }
       
        boolean pluginFound = false;
        for (WGAPlugin plugin : core.getPluginSet().getPlugins()) {
            if (plugin.isActive() && plugin.isValid() && plugin.getCsConfig().getPluginConfig().isUsageAsAuthSource()) {
                pluginFound = true;
                break;
            }
        }
View Full Code Here

        _registry = registry;
    }

    public void testAvailability(ModuleRegistry reg) throws ModuleAvailabilityException {
       
        WGACore core = (WGACore) reg.getContextObjects().get(WGACore.class);
        if (core == null) {
            throw new ModuleAvailabilityException("Cannot retrieve WGACore to test availability");
        }
       
        boolean csFound = false;
        for (WGDatabase db : core.getContentdbs().values()) {
            if (db.hasFeature(WGDatabase.FEATURE_FULLCONTENTFEATURES) && !db.getDbReference().startsWith(PluginConfig.PLUGIN_DBKEY_PREFIX)) {
                csFound = true;
                break;
            }
        }
View Full Code Here

TOP

Related Classes of de.innovationgate.wgpublisher.WGACore$TMLScriptGlobalRegistry

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.