Diverse Kleinigkeiten im Zusammenhang mit Analyse Portal.

git-svn-id: https://svn.libreccm.org/ccm/trunk@807 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-03-28 23:55:45 +00:00
parent d15c09b82d
commit d6c1c1ae57
28 changed files with 162 additions and 49 deletions

View File

@ -20,17 +20,20 @@ package com.arsdigita.aplaws;
import org.apache.log4j.Logger; 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 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 final Logger LOG = Logger.getLogger(Aplaws.class);
private static AplawsConfig aplawsConfig = new AplawsConfig(); /** APLAWS configuration object*/
private static AplawsConfig aplawsConfig = AplawsConfig.getConfig();
static {
aplawsConfig.load();
}
public static final AplawsConfig getAplawsConfig() { public static final AplawsConfig getAplawsConfig() {
return aplawsConfig; return aplawsConfig;

View File

@ -23,6 +23,8 @@ import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
import org.apache.log4j.Logger;
/** /**
* AplawsConfig * AplawsConfig
@ -32,13 +34,32 @@ import com.arsdigita.util.parameter.StringParameter;
*/ */
public class AplawsConfig extends AbstractConfig { 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
} }

View File

@ -79,6 +79,9 @@ public class Loader extends PackageLoader {
// private StringParameter m_subjectDomain; // private StringParameter m_subjectDomain;
// private StringParameter m_rssDomain; // private StringParameter m_rssDomain;
/**
* Constructor
*/
public Loader() { public Loader() {
// Es werden stumpf mehrere Kategorisierungsdomains fuer TERMS // Es werden stumpf mehrere Kategorisierungsdomains fuer TERMS
@ -182,7 +185,7 @@ public class Loader extends PackageLoader {
.retrieveApplicationForPath("/portal/"); .retrieveApplicationForPath("/portal/");
portal.setDefaultLayout(PageLayout portal.setDefaultLayout(PageLayout
.findLayoutByFormat(PageLayout.FORMAT_ONE_COLUMN)); .findLayoutByFormat(PageLayout.FORMAT_ONE_COLUMN));
} // run method } // end run method
// public void registerServicesTemplate(String appURL) { // public void registerServicesTemplate(String appURL) {
// Application app = Application.retrieveApplicationForPath(appURL); // Application app = Application.retrieveApplicationForPath(appURL);

View File

@ -22,9 +22,15 @@ import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObject;
import org.apache.log4j.Logger;
public class HomepagePortalSelectionModel extends AbstractSingleSelectionModel public class HomepagePortalSelectionModel extends AbstractSingleSelectionModel
implements PortalSelectionModel { implements PortalSelectionModel {
/** Private logger instance for debugging */
private static Logger s_log = Logger.getLogger(
HomepagePortalSelectionModel.class);
private HomepageWorkspaceSelectionModel m_workspace; private HomepageWorkspaceSelectionModel m_workspace;
private int m_column; private int m_column;
@ -32,6 +38,13 @@ public class HomepagePortalSelectionModel extends AbstractSingleSelectionModel
int column) { int column) {
m_workspace = workspace; m_workspace = workspace;
m_column = column; m_column = column;
if (s_log.isDebugEnabled()) {
s_log.debug("Constructor HomepageWorkspaceSelectionModel " + " [" +
"Workspace: " + m_workspace + "," +
"Columns: " + column + "]");
}
} }
public void onCustomize(PageState state) { public void onCustomize(PageState state) {

View File

@ -29,11 +29,20 @@ import com.arsdigita.kernel.permissions.PermissionService;
import com.arsdigita.kernel.permissions.PermissionDescriptor; import com.arsdigita.kernel.permissions.PermissionDescriptor;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.kernel.Party; 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 { public class HomepageWorkspace extends SimpleContainer {
/** Private logger instance for debugging */
private static Logger s_log = Logger.getLogger(
HomepageWorkspace.class);
private HomepagePortalSelectionModel m_model; private HomepagePortalSelectionModel m_model;
private ActionLink m_reset; private ActionLink m_reset;
private ActionLink m_browse; private ActionLink m_browse;
@ -47,10 +56,19 @@ public class HomepageWorkspace extends SimpleContainer {
public HomepageWorkspace() { public HomepageWorkspace() {
super("portal:homepageWorkspace", PortalConstants.PORTAL_XML_NS); super("portal:homepageWorkspace", PortalConstants.PORTAL_XML_NS);
m_customizable = false; m_customizable = false;
if (s_log.isDebugEnabled()) {
s_log.debug("Constructor HomepageWorkspace finished. " );
}
} }
public void setModel(HomepagePortalSelectionModel model) { public void setModel(HomepagePortalSelectionModel model) {
m_model = model; m_model = model;
if (s_log.isDebugEnabled()) {
s_log.debug("setModel: " + m_model );
}
} }
public void setCustomizable(boolean customizable) { public void setCustomizable(boolean customizable) {

View File

@ -51,7 +51,7 @@ public class HomepageWorkspaceSelectionModel {
private RequestLocal m_custom = new RequestLocal(); private RequestLocal m_custom = new RequestLocal();
private static Logger s_log = Logger.getLogger private static Logger s_log = Logger.getLogger
(HomepageWorkspaceSelectionModel.class.getName()); (HomepageWorkspaceSelectionModel.class.getName());
public WorkspacePage getPortal(PageState state, public WorkspacePage getPortal(PageState state,
int column) { int column) {

View File

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 624 B

View File

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 122 B

View File

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 357 B

View File

Before

Width:  |  Height:  |  Size: 100 B

After

Width:  |  Height:  |  Size: 100 B

View File

Before

Width:  |  Height:  |  Size: 99 B

After

Width:  |  Height:  |  Size: 99 B

View File

Before

Width:  |  Height:  |  Size: 99 B

After

Width:  |  Height:  |  Size: 99 B

View File

Before

Width:  |  Height:  |  Size: 100 B

After

Width:  |  Height:  |  Size: 100 B

View File

@ -29,7 +29,7 @@
</xsl:variable> </xsl:variable>
<a href="{@url}" title="{$title}"> <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> </a>
</xsl:template> </xsl:template>

View File

@ -15,7 +15,6 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.aplaws; package com.arsdigita.aplaws;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -28,15 +27,13 @@ import org.apache.log4j.Logger;
*/ */
public class Aplaws { public class Aplaws {
/** A logger instance. */
private static final Logger LOG = Logger.getLogger(Aplaws.class); 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 { public static AplawsConfig getAplawsConfig() {
aplawsConfig.load();
}
public static final AplawsConfig getAplawsConfig() {
return aplawsConfig; return aplawsConfig;
} }
} }

View File

@ -15,7 +15,6 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.aplaws; package com.arsdigita.aplaws;
import com.arsdigita.runtime.AbstractConfig; 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.BooleanParameter;
import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.StringParameter;
import org.apache.log4j.Logger;
/** /**
* AplawsConfig * AplawsConfig
* *
* @version $Revision: 1.2 $ $Date: 2005/01/07 19:01:40 $ * @version $Revision: 1.2 $ $Date: 2005/01/07 19:01:40 $
* @version $Id: AplawsConfig.java 1565 2007-04-18 16:46:14Z apevec $ * @version $Id: AplawsConfig.java 1565 2007-04-18 16:46:14Z apevec $
*/ */
public class AplawsConfig extends AbstractConfig { public class AplawsConfig extends AbstractConfig {
private final Parameter m_overrideAnavFromLGCLMappings = new BooleanParameter /** A logger instance. */
("com.arsdigita.aplaws.override_anav_from_lgcl_mappings", Parameter.OPTIONAL, new Boolean(false)); private static final Logger s_log = Logger.getLogger(AplawsConfig.class);
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);
/** 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);
public AplawsConfig() { public AplawsConfig() {
register(m_overrideAnavFromLGCLMappings); register(m_overrideAnavFromLGCLMappings);
@ -55,22 +91,21 @@ public class AplawsConfig extends AbstractConfig {
public Boolean getOverrideAnavFromLGCLMappings() { public Boolean getOverrideAnavFromLGCLMappings() {
return (Boolean) get(m_overrideAnavFromLGCLMappings); return (Boolean) get(m_overrideAnavFromLGCLMappings);
} }
public String getAutocatServiceURL() { public String getAutocatServiceURL() {
String url = (String) get(m_autocatServiceURL); String url = (String) get(m_autocatServiceURL);
return url; return url;
} }
public String getAutocatServiceUsername() { public String getAutocatServiceUsername() {
String username = (String) get(m_autocatServiceUsername); String username = (String) get(m_autocatServiceUsername);
return username; return username;
} }
public String getAutocatServicePassword() { public String getAutocatServicePassword() {
String password = (String) get(m_autocatServicePassword); String password = (String) get(m_autocatServicePassword);
return password; return password;
} }
// moved into c.ad.london.terms.TermsConfig // moved into c.ad.london.terms.TermsConfig
// public boolean ajaxExpandAllBranches () { // public boolean ajaxExpandAllBranches () {
// return ((Boolean)get(m_ajaxExpandAllBranches)).booleanValue(); // return ((Boolean)get(m_ajaxExpandAllBranches)).booleanValue();

View File

@ -42,6 +42,13 @@ public class WebAppPatternGenerator implements PatternGenerator {
Application app = Web.getContext().getApplication(); Application app = Web.getContext().getApplication();
String ctx = app == null ? null : app.getContextPath(); 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 || if (app == null ||
ctx == null || ctx == null ||
"".equals(ctx)) { "".equals(ctx)) {

View File

@ -41,6 +41,10 @@ import com.arsdigita.domain.DataObjectNotFoundException;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/**
*
*
*/
public class HomepageWorkspaceSelectionModel { public class HomepageWorkspaceSelectionModel {
private RequestLocal m_loaded = new RequestLocal(); private RequestLocal m_loaded = new RequestLocal();
private RequestLocal m_global = new RequestLocal(); private RequestLocal m_global = new RequestLocal();
@ -51,7 +55,7 @@ public class HomepageWorkspaceSelectionModel {
private RequestLocal m_custom = new RequestLocal(); private RequestLocal m_custom = new RequestLocal();
private static Logger s_log = Logger.getLogger private static Logger s_log = Logger.getLogger
(HomepageWorkspaceSelectionModel.class.getName()); (HomepageWorkspaceSelectionModel.class.getName());
public WorkspacePage getPortal(PageState state, public WorkspacePage getPortal(PageState state,
int column) { int column) {

View File

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

View File

@ -5,7 +5,7 @@
<jsp:directive.page <jsp:directive.page
import="com.arsdigita.dispatcher.DispatcherHelper, import="com.arsdigita.dispatcher.DispatcherHelper,
com.arsdigita.aplaws.ui.*"/> com.arsdigita.aplaws.ui.*" />
<jsp:scriptlet> <jsp:scriptlet>
DispatcherHelper.cacheForWorld(response,900); DispatcherHelper.cacheForWorld(response,900);

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

View File

@ -46,7 +46,7 @@
</xsl:variable> </xsl:variable>
<a href="{@url}" title="{$title}"> <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> </a>
</th> </th>
</xsl:for-each> </xsl:for-each>
@ -151,16 +151,16 @@
<xsl:when test="@isSelected = 'false'"> <xsl:when test="@isSelected = 'false'">
<td class="tab-label"> <td class="tab-label">
<a href="{@moveLeftAction}"> <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>
<a href="{@moveRightAction}"> <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>
<a href="{@selectAction}"> <a href="{@selectAction}">
<xsl:value-of select="title"/> <xsl:value-of select="title"/>
</a> </a>
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')"> <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> </a>
</td> </td>
<td class="tab-end"/> <td class="tab-end"/>
@ -172,12 +172,12 @@
<tr> <tr>
<td> <td>
<a href="{@moveLeftAction}"> <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>
</td> </td>
<td> <td>
<a href="{@moveRightAction}"> <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>
</td> </td>
<td> <td>
@ -185,7 +185,7 @@
</td> </td>
<td> <td>
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')"> <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> </a>
</td> </td>
</tr> </tr>
@ -197,14 +197,14 @@
<xsl:otherwise> <xsl:otherwise>
<td class="current-tab-label"> <td class="current-tab-label">
<a href="{@moveLeftAction}"> <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>
<a href="{@moveRightAction}"> <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>
<xsl:value-of select="title"/> <xsl:value-of select="title"/>
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')"> <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> </a>
</td> </td>
<td class="current-tab-end"/> <td class="current-tab-end"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B