Nachtrag, was vergessen.
git-svn-id: https://svn.libreccm.org/ccm/trunk@834 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
792654009f
commit
26a07c00fc
|
|
@ -51,18 +51,24 @@ public class ApplicationPatternGenerator implements PatternGenerator {
|
||||||
public String[] generateValues(String key,
|
public String[] generateValues(String key,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
|
|
||||||
|
s_log.debug("Processing Application with key: " + key );
|
||||||
|
|
||||||
final Application app = Web.getContext().getApplication();
|
final Application app = Web.getContext().getApplication();
|
||||||
|
|
||||||
if (app != null) {
|
if (app != null) {
|
||||||
return new String[] {
|
String[] returnValue = { app.getApplicationType().getName() };
|
||||||
app.getApplicationType().getName()
|
s_log.warn("Found application >>"+returnValue+"<< in Application.");
|
||||||
};
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SiteNodeRequestContext is deprecated and replaced by web.WebContext
|
// SiteNodeRequestContext is deprecated and replaced by web.WebContext
|
||||||
// used in the code above (Web.getContext().
|
// used in the code above (Web.getContext().
|
||||||
// This code should never be executed.
|
// This code should never be executed.
|
||||||
s_log.error("Application not found in WebApplication context!");
|
// Findings: SideNode is requirred for modules which dont use
|
||||||
|
// legacy-compatible applications but package-type apps. content-center
|
||||||
|
// and cms-service are 2 examples. Code can be eliminated when all apps
|
||||||
|
// will use web.Application for loading and instantiation.
|
||||||
|
s_log.warn("ApplicationType for >>" +key +
|
||||||
|
"<< not found. Trying SiteNodes instead.");
|
||||||
|
|
||||||
|
|
||||||
SiteNodeRequestContext ctx = (SiteNodeRequestContext)
|
SiteNodeRequestContext ctx = (SiteNodeRequestContext)
|
||||||
|
|
@ -71,10 +77,15 @@ public class ApplicationPatternGenerator implements PatternGenerator {
|
||||||
SiteNode node = ctx.getSiteNode();
|
SiteNode node = ctx.getSiteNode();
|
||||||
|
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
return new String[] {
|
String[] returnValue = {
|
||||||
node.getPackageInstance().getType().getKey()
|
node.getPackageInstance().getType().getKey()
|
||||||
};
|
};
|
||||||
|
s_log.debug("Found node >>" + returnValue + "<< in SiteNodes.");
|
||||||
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s_log.warn("ApplicationType for " +key +
|
||||||
|
" could not be found in SiteNodes either. Returning empty String[]");
|
||||||
|
|
||||||
return new String[] {};
|
return new String[] {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue