<commit_before>/*
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Id$
 */
package org.gridlab.gridsphere.layout;

import org.gridlab.gridsphere.core.persistence.PersistenceManagerException;
import org.gridlab.gridsphere.portlet.*;
import org.gridlab.gridsphere.portlet.impl.SportletProperties;
import org.gridlab.gridsphere.portlet.service.PortletServiceException;
import org.gridlab.gridsphere.portlet.service.spi.PortletServiceFactory;
import org.gridlab.gridsphere.portlet.service.spi.impl.SportletServiceFactory;
import org.gridlab.gridsphere.portletcontainer.GridSphereConfig;
import org.gridlab.gridsphere.portletcontainer.GridSphereEvent;
import org.gridlab.gridsphere.portletcontainer.PortletInvoker;
import org.gridlab.gridsphere.services.core.cache.CacheService;
import org.gridlab.gridsphere.services.core.security.acl.AccessControlManagerService;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.Serializable;
import java.io.StringWriter;
import java.util.*;
import java.util.List;
import java.awt.*;

/**
 * The <code>PortletPage</code> is the generic container for a collection of
 * concrete portlet components and provides lifecycle methods for traversing
 * the tree of components and handling actions and performing rendering.
 */
public class PortletPage implements Serializable, Cloneable {

    //private PortletLog log = SportletLog.getInstance(PortletPage.class);

    protected int COMPONENT_ID = -1;

    protected transient CacheService cacheService = null;
    private transient AccessControlManagerService aclService = null;

    protected PortletContainer footerContainer = null;
    protected PortletContainer headerContainer = null;
    protected PortletTabbedPane tabbedPane = null;

    // The component ID's of each of the layout components
    protected List componentIdentifiers = new Vector();

    // The list of portlets a user has-- generally contained within a PortletFrame/PortletTitleBar combo
    //protected List portlets = new ArrayList();

    protected String keywords = "";
    protected String title = "";
    protected String theme = "";

    //private String layoutMappingFile = GridSphereConfig.getServletContext().getRealPath("/WEB-INF/mapping/layout-mapping.xml");
    private String layoutDescriptor = null;

    private Hashtable labelsHash = new Hashtable();
    private Hashtable portletHash = new Hashtable();

    private boolean useDiv = false;
                                                 
    /**
     * Constructs an instance of PortletPage
     */
    public PortletPage() {
    }

    public void setLayoutDescriptor(String layoutDescriptor) {
        this.layoutDescriptor = layoutDescriptor;
    }

    public String getLayoutDescriptor() {
        return layoutDescriptor;
    }

    /**
     * Sets the portlet container title
     *
     * @param title the portlet container title
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * Returns the portlet container title
     *
     * @return the portlet container title
     */
    public String getTitle() {
        return title;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    /**
     * Return the theme of this portlet component
     *
     * @return the theme of this portlet component
     */
    public String getTheme() {
        return theme;
    }

    /**
     * Returns the keywords used in rendering output
     *
     * @return keywords<commit_msg>*** empty log message ***<commit_after>/*
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Id$
 */
package org.gridlab.gridsphere.layout;

import org.gridlab.gridsphere.core.persistence.PersistenceManagerException;
import org.gridlab.gridsphere.portlet.*;
import org.gridlab.gridsphere.portlet.impl.SportletProperties;
import org.gridlab.gridsphere.portlet.service.PortletServiceException;
import org.gridlab.gridsphere.portlet.service.spi.PortletServiceFactory;
import org.gridlab.gridsphere.portlet.service.spi.impl.SportletServiceFactory;
import org.gridlab.gridsphere.portletcontainer.GridSphereConfig;
import org.gridlab.gridsphere.portletcontainer.GridSphereEvent;
import org.gridlab.gridsphere.portletcontainer.PortletInvoker;
import org.gridlab.gridsphere.services.core.cache.CacheService;
import org.gridlab.gridsphere.services.core.security.acl.AccessControlManagerService;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.Serializable;
import java.io.StringWriter;
import java.util.*;
import java.util.List;
import java.awt.*;

/**
 * The <code>PortletPage</code> is the generic container for a collection of
 * concrete portlet components and provides lifecycle methods for traversing
 * the tree of components and handling actions and performing rendering.
 */
public class PortletPage implements Serializable, Cloneable {

    //private PortletLog log = SportletLog.getInstance(PortletPage.class);

    protected int COMPONENT_ID = -1;

    protected transient CacheService cacheService = null;
    private transient AccessControlManagerService aclService = null;

    protected PortletContainer footerContainer = null;
    protected PortletContainer headerContainer = null;
    protected PortletTabbedPane tabbedPane = null;

    // The component ID's of each of the layout components
    protected List componentIdentifiers = new Vector();

    // The list of portlets a user has-- generally contained within a PortletFrame/PortletTitleBar combo
    //protected List portlets = new ArrayList();

    protected String keywords = "";
    protected String title = "";
    protected String theme = "";

    //private String layoutMappingFile = GridSphereConfig.getServletContext().getRealPath("/WEB-INF/mapping/layout-mapping.xml");
    private String layoutDescriptor = null;

    private Hashtable labelsHash = new Hashtable();
    private Hashtable portletHash = new Hashtable();

    private boolean useDiv = false;
                                                 
    /**
     * Constructs an instance of PortletPage
     */
    public PortletPage() {
    }

    public void setLayoutDescriptor(String layoutDescriptor) {
        this.layoutDescriptor = layoutDescriptor;
    }

    public String getLayoutDescriptor() {
        return layoutDescriptor;
    }

    /**
     * Sets the portlet container title
     *
     * @param title the portlet container title
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * Returns the portlet container title
     *
     * @return the portlet container title
     */
    public String getTitle() {
        return title;
    }

    public boolean getUseDiv() {
        return useDiv;
    }

    public void setUseDiv(boolean useDiv) {
        this.useDiv = useDiv;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    /**
     * Return the theme of this portlet component
     *
     * @return the theme of this portlet component
     */
    public String getTheme() {
        return theme;
    }

    /**
     * Returns the keywords used in rendering output
     *
     * @return keywords
{'fraction_non_alphanumeric': 0.08588957055214724, 'fraction_numerical': 0.0002788622420524261, 'mean_word_length': 3.3106971153846154, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2362420', 'n_tokens_mistral': 1941, 'n_tokens_neox': 1862, 'n_words': 526}