Diverse Kleinigkeiten im Zusammenhang mit Analyse Portal.
git-svn-id: https://svn.libreccm.org/ccm/trunk@807 8810af33-2d31-482b-a856-94f89814c4dfmaster
|
|
@ -20,17 +20,20 @@ package com.arsdigita.aplaws;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Central entry point for the APLAWS integration and configuration module.
|
||||
*
|
||||
* Here: ccm-gen-aplaws generic bundle!
|
||||
* Provides just a handle into config file.
|
||||
* @version "$Id: Aplaws.java 1297 2006-08-25 18:17:50Z apevec $
|
||||
*/
|
||||
public class Aplaws {
|
||||
public static final String versionId =
|
||||
"$Id: Aplaws.java 1297 2006-08-25 18:17:50Z apevec $";
|
||||
|
||||
/** A logger instance. */
|
||||
private static final Logger LOG = Logger.getLogger(Aplaws.class);
|
||||
|
||||
private static AplawsConfig aplawsConfig = new AplawsConfig();
|
||||
|
||||
static {
|
||||
aplawsConfig.load();
|
||||
}
|
||||
/** APLAWS configuration object*/
|
||||
private static AplawsConfig aplawsConfig = AplawsConfig.getConfig();
|
||||
|
||||
public static final AplawsConfig getAplawsConfig() {
|
||||
return aplawsConfig;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ import com.arsdigita.util.parameter.Parameter;
|
|||
import com.arsdigita.util.parameter.BooleanParameter;
|
||||
import com.arsdigita.util.parameter.StringParameter;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* AplawsConfig
|
||||
|
|
@ -32,13 +34,32 @@ import com.arsdigita.util.parameter.StringParameter;
|
|||
*/
|
||||
public class AplawsConfig extends AbstractConfig {
|
||||
|
||||
/** A logger instance. */
|
||||
private static final Logger s_log = Logger.getLogger(AplawsConfig.class);
|
||||
|
||||
/** Singelton config object. */
|
||||
private static AplawsConfig s_conf;
|
||||
|
||||
|
||||
public AplawsConfig() {
|
||||
loadInfo();
|
||||
/**
|
||||
* Gain a SimpleAddressConfig object.
|
||||
*
|
||||
* Singelton pattern, don't instantiate a config object using the
|
||||
* constructor directly!
|
||||
* @return
|
||||
*/
|
||||
public static synchronized AplawsConfig getConfig() {
|
||||
if (s_conf == null) {
|
||||
s_conf = new AplawsConfig();
|
||||
s_conf.load();
|
||||
}
|
||||
|
||||
return s_conf;
|
||||
}
|
||||
|
||||
// set of configuration parameters
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,9 @@ public class Loader extends PackageLoader {
|
|||
// private StringParameter m_subjectDomain;
|
||||
// private StringParameter m_rssDomain;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public Loader() {
|
||||
|
||||
// Es werden stumpf mehrere Kategorisierungsdomains fuer TERMS
|
||||
|
|
@ -182,7 +185,7 @@ public class Loader extends PackageLoader {
|
|||
.retrieveApplicationForPath("/portal/");
|
||||
portal.setDefaultLayout(PageLayout
|
||||
.findLayoutByFormat(PageLayout.FORMAT_ONE_COLUMN));
|
||||
} // run method
|
||||
} // end run method
|
||||
|
||||
// public void registerServicesTemplate(String appURL) {
|
||||
// Application app = Application.retrieveApplicationForPath(appURL);
|
||||
|
|
|
|||
|
|
@ -22,9 +22,15 @@ import com.arsdigita.bebop.PageState;
|
|||
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||
import com.arsdigita.domain.DomainObject;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class HomepagePortalSelectionModel extends AbstractSingleSelectionModel
|
||||
implements PortalSelectionModel {
|
||||
|
||||
/** Private logger instance for debugging */
|
||||
private static Logger s_log = Logger.getLogger(
|
||||
HomepagePortalSelectionModel.class);
|
||||
|
||||
private HomepageWorkspaceSelectionModel m_workspace;
|
||||
private int m_column;
|
||||
|
||||
|
|
@ -32,6 +38,13 @@ public class HomepagePortalSelectionModel extends AbstractSingleSelectionModel
|
|||
int column) {
|
||||
m_workspace = workspace;
|
||||
m_column = column;
|
||||
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("Constructor HomepageWorkspaceSelectionModel " + " [" +
|
||||
"Workspace: " + m_workspace + "," +
|
||||
"Columns: " + column + "]");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onCustomize(PageState state) {
|
||||
|
|
|
|||
|
|
@ -29,11 +29,20 @@ import com.arsdigita.kernel.permissions.PermissionService;
|
|||
import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.kernel.Party;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
|
||||
import com.arsdigita.kernel.Kernel;import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class HomepageWorkspace extends SimpleContainer {
|
||||
|
||||
/** Private logger instance for debugging */
|
||||
private static Logger s_log = Logger.getLogger(
|
||||
HomepageWorkspace.class);
|
||||
|
||||
private HomepagePortalSelectionModel m_model;
|
||||
private ActionLink m_reset;
|
||||
private ActionLink m_browse;
|
||||
|
|
@ -47,10 +56,19 @@ public class HomepageWorkspace extends SimpleContainer {
|
|||
public HomepageWorkspace() {
|
||||
super("portal:homepageWorkspace", PortalConstants.PORTAL_XML_NS);
|
||||
m_customizable = false;
|
||||
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("Constructor HomepageWorkspace finished. " );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setModel(HomepagePortalSelectionModel model) {
|
||||
m_model = model;
|
||||
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("setModel: " + m_model );
|
||||
}
|
||||
}
|
||||
|
||||
public void setCustomizable(boolean customizable) {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 624 B After Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 122 B |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 100 B After Width: | Height: | Size: 100 B |
|
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 99 B |
|
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 99 B |
|
Before Width: | Height: | Size: 100 B After Width: | Height: | Size: 100 B |
|
|
@ -29,7 +29,7 @@
|
|||
</xsl:variable>
|
||||
|
||||
<a href="{@url}" title="{$title}">
|
||||
<img src="/STATIC/portal/{@name}.gif" border="1" alt="{$title}"/>
|
||||
<img src="{$theme-prefix}/portal/{@name}.gif" border="1" alt="{$title}"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.aplaws;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
|
@ -28,15 +27,13 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class Aplaws {
|
||||
|
||||
/** A logger instance. */
|
||||
private static final Logger LOG = Logger.getLogger(Aplaws.class);
|
||||
/** APLAWS configuration object*/
|
||||
private static AplawsConfig aplawsConfig = AplawsConfig.getConfig();
|
||||
|
||||
private static AplawsConfig aplawsConfig = new AplawsConfig();
|
||||
|
||||
static {
|
||||
aplawsConfig.load();
|
||||
}
|
||||
|
||||
public static final AplawsConfig getAplawsConfig() {
|
||||
public static AplawsConfig getAplawsConfig() {
|
||||
return aplawsConfig;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.aplaws;
|
||||
|
||||
import com.arsdigita.runtime.AbstractConfig;
|
||||
|
|
@ -23,24 +22,61 @@ import com.arsdigita.util.parameter.Parameter;
|
|||
import com.arsdigita.util.parameter.BooleanParameter;
|
||||
import com.arsdigita.util.parameter.StringParameter;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* AplawsConfig
|
||||
*
|
||||
* @version $Revision: 1.2 $ $Date: 2005/01/07 19:01:40 $
|
||||
* @version $Id: AplawsConfig.java 1565 2007-04-18 16:46:14Z apevec $
|
||||
*/
|
||||
|
||||
public class AplawsConfig extends AbstractConfig {
|
||||
|
||||
private final Parameter m_overrideAnavFromLGCLMappings = new BooleanParameter
|
||||
("com.arsdigita.aplaws.override_anav_from_lgcl_mappings", Parameter.OPTIONAL, new Boolean(false));
|
||||
private final Parameter m_autocatServiceURL = new StringParameter("com.arsdigita.aplaws.autocat_url", Parameter.OPTIONAL, "http://demo.masprovider.com/searchLightWS/services/textMiner");
|
||||
private final Parameter m_autocatServiceUsername = new StringParameter("com.arsdigita.aplaws.autocat_username", Parameter.OPTIONAL, null);
|
||||
private final Parameter m_autocatServicePassword = new StringParameter("com.arsdigita.aplaws.autocat_password", Parameter.OPTIONAL, null);
|
||||
/** A logger instance. */
|
||||
private static final Logger s_log = Logger.getLogger(AplawsConfig.class);
|
||||
|
||||
/** Singelton config object. */
|
||||
private static AplawsConfig s_conf;
|
||||
|
||||
/**
|
||||
* Gain a SimpleAddressConfig object.
|
||||
*
|
||||
* Singelton pattern, don't instantiate a config object using the
|
||||
* constructor directly!
|
||||
* @return
|
||||
*/
|
||||
public static synchronized AplawsConfig getConfig() {
|
||||
if (s_conf == null) {
|
||||
s_conf = new AplawsConfig();
|
||||
s_conf.load();
|
||||
}
|
||||
|
||||
return s_conf;
|
||||
}
|
||||
|
||||
// set of configuration parameters
|
||||
private final Parameter m_overrideAnavFromLGCLMappings =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.aplaws.override_anav_from_lgcl_mappings",
|
||||
Parameter.OPTIONAL, new Boolean(false));
|
||||
private final Parameter m_autocatServiceURL =
|
||||
new StringParameter(
|
||||
"com.arsdigita.aplaws.autocat_url",
|
||||
Parameter.OPTIONAL,
|
||||
"http://demo.masprovider.com/searchLightWS/services/textMiner");
|
||||
private final Parameter m_autocatServiceUsername =
|
||||
new StringParameter(
|
||||
"com.arsdigita.aplaws.autocat_username",
|
||||
Parameter.OPTIONAL, null);
|
||||
private final Parameter m_autocatServicePassword =
|
||||
new StringParameter(
|
||||
"com.arsdigita.aplaws.autocat_password",
|
||||
Parameter.OPTIONAL, null);
|
||||
// moved into c.ad.london.terms.TermsConfig
|
||||
// private final Parameter m_ajaxExpandAllBranches = new BooleanParameter("com.arsdigita.aplaws.ajax_expand_on_all_branches", Parameter.OPTIONAL, Boolean.FALSE);
|
||||
|
||||
|
||||
// private final Parameter m_ajaxExpandAllBranches =
|
||||
// new BooleanParameter(
|
||||
// "com.arsdigita.aplaws.ajax_expand_on_all_branches",
|
||||
// Parameter.OPTIONAL, Boolean.FALSE);
|
||||
|
||||
public AplawsConfig() {
|
||||
register(m_overrideAnavFromLGCLMappings);
|
||||
|
|
@ -70,7 +106,6 @@ public class AplawsConfig extends AbstractConfig {
|
|||
String password = (String) get(m_autocatServicePassword);
|
||||
return password;
|
||||
}
|
||||
|
||||
// moved into c.ad.london.terms.TermsConfig
|
||||
// public boolean ajaxExpandAllBranches () {
|
||||
// return ((Boolean)get(m_ajaxExpandAllBranches)).booleanValue();
|
||||
|
|
|
|||
|
|
@ -42,6 +42,13 @@ public class WebAppPatternGenerator implements PatternGenerator {
|
|||
Application app = Web.getContext().getApplication();
|
||||
String ctx = app == null ? null : app.getContextPath();
|
||||
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("Generating Values key: " + key + " [" +
|
||||
"Web.getContext(): " + Web.getContext() + "," +
|
||||
"Application: " + Web.getContext().getApplication() + "," +
|
||||
"ContextPath: " + ctx + "," + "]");
|
||||
}
|
||||
|
||||
if (app == null ||
|
||||
ctx == null ||
|
||||
"".equals(ctx)) {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@ import com.arsdigita.domain.DataObjectNotFoundException;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class HomepageWorkspaceSelectionModel {
|
||||
private RequestLocal m_loaded = new RequestLocal();
|
||||
private RequestLocal m_global = new RequestLocal();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
jsp files replace files provided by ccm-ldn-protal.
|
||||
jsp files replace files provided by ccm-ldn-portal.
|
||||
|
||||
goal: Make the portal homepage read-only and cached for 15min. EXPERIMENTAL
|
||||
|
||||
Dynamic no-cache version is available at /ccm/portal/custom.jsp for admins to get the 'customize area' links.
|
||||
Dynamic no-cache version is available at /ccm/portal/custom.jsp for admins
|
||||
to get the 'customize area' links.
|
||||
see r1082
|
||||
|
||||
Actually:
|
||||
In the default configuration BaseDispatcher searches in the following order:
|
||||
1. /templates/ccm-ldn-portal/portal/index.jsp
|
||||
2. /templates/ccm-ldn-portal/portal/index.html
|
||||
3. /templates/ccm-ldn-portal/index.jsp
|
||||
4. /templates/ccm-ldn-portal/index.html (probably, not tested)
|
||||
|
||||
So, currently the first try is successfull and
|
||||
aplaws/ui/HomepageWorkspaceSelectionModel is always used via index.jsp
|
||||
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 624 B |
|
After Width: | Height: | Size: 122 B |
|
After Width: | Height: | Size: 357 B |
|
|
@ -46,7 +46,7 @@
|
|||
</xsl:variable>
|
||||
|
||||
<a href="{@url}" title="{$title}">
|
||||
<img src="/STATIC/portal/{@name}.gif" border="0" alt="{$title}"/>
|
||||
<img src="{$here}/{@name}.gif" border="0" alt="{$title}"/>
|
||||
</a>
|
||||
</th>
|
||||
</xsl:for-each>
|
||||
|
|
@ -151,16 +151,16 @@
|
|||
<xsl:when test="@isSelected = 'false'">
|
||||
<td class="tab-label">
|
||||
<a href="{@moveLeftAction}">
|
||||
<img src="/STATIC/portal/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="{$here}/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
<a href="{@moveRightAction}">
|
||||
<img src="/STATIC/portal/moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="{$here}/moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
<a href="{@selectAction}">
|
||||
<xsl:value-of select="title"/>
|
||||
</a>
|
||||
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
||||
<img src="/STATIC/portal/delete.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="{$here}/delete.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="tab-end"/>
|
||||
|
|
@ -172,12 +172,12 @@
|
|||
<tr>
|
||||
<td>
|
||||
<a href="{@moveLeftAction}">
|
||||
<img src="/STATIC/portal/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="{$here}/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{@moveRightAction}">
|
||||
<img src="/STATIC/portal/moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="{$here}/moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
|
|
@ -185,7 +185,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
||||
<img src="/STATIC/portal/delete.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="{$here}/delete.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -197,14 +197,14 @@
|
|||
<xsl:otherwise>
|
||||
<td class="current-tab-label">
|
||||
<a href="{@moveLeftAction}">
|
||||
<img src="/STATIC/portal/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="{$here}/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
<a href="{@moveRightAction}">
|
||||
<img src="/STATIC/portal/moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="{$here}/moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
<xsl:value-of select="title"/>
|
||||
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
||||
<img src="/STATIC/portal/delete.gif" border="0" style="margin-left: 5px"/>
|
||||
<img src="{$here}/delete.gif" border="0" style="margin-left: 5px"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="current-tab-end"/>
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 100 B |
|
After Width: | Height: | Size: 99 B |
|
After Width: | Height: | Size: 99 B |
|
After Width: | Height: | Size: 100 B |