Verschiedene Probleme mit einigen Admin-Klassen korrgiert.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2184 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
fe52693426
commit
2f4c3a41d7
|
|
@ -62,7 +62,7 @@ public class FileAttachmentConfig extends AbstractConfig {
|
|||
/**
|
||||
* Constructor, don't use it directly!
|
||||
*/
|
||||
protected FileAttachmentConfig() {
|
||||
public FileAttachmentConfig() {
|
||||
|
||||
super();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,18 +11,14 @@ import com.arsdigita.util.parameter.Parameter;
|
|||
*/
|
||||
public class NotesConfig extends AbstractConfig {
|
||||
|
||||
private static final NotesConfig INSTANCE = new NotesConfig();
|
||||
|
||||
static {
|
||||
INSTANCE.load();
|
||||
}
|
||||
private static NotesConfig INSTANCE;
|
||||
|
||||
private final Parameter assetStepSortKey = new IntegerParameter(
|
||||
"com.arsdigita.cms.contentassets.notes.asset_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
3);
|
||||
|
||||
protected NotesConfig() {
|
||||
public NotesConfig() {
|
||||
|
||||
super();
|
||||
|
||||
|
|
@ -33,11 +29,14 @@ public class NotesConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
public static final NotesConfig getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new NotesConfig();
|
||||
INSTANCE.load();
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public Integer getAssetStepSortKey() {
|
||||
return (Integer) get(assetStepSortKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,20 +11,14 @@ import com.arsdigita.util.parameter.Parameter;
|
|||
*/
|
||||
public class RelatedLinkConfig extends AbstractConfig {
|
||||
|
||||
private static final RelatedLinkConfig INSTANCE = new RelatedLinkConfig();
|
||||
|
||||
static {
|
||||
INSTANCE.load();
|
||||
}
|
||||
private static RelatedLinkConfig INSTANCE;
|
||||
|
||||
private final Parameter assetStepSortKey = new IntegerParameter(
|
||||
"com.arsdigita.cms.relatedlink.contentassets.asset_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
1);
|
||||
|
||||
protected RelatedLinkConfig() {
|
||||
|
||||
super();
|
||||
public RelatedLinkConfig() {
|
||||
|
||||
register(assetStepSortKey);
|
||||
|
||||
|
|
@ -32,6 +26,10 @@ public class RelatedLinkConfig extends AbstractConfig {
|
|||
}
|
||||
|
||||
public static final RelatedLinkConfig getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new RelatedLinkConfig();
|
||||
INSTANCE.load();
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
*/
|
||||
package com.arsdigita.navigation;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -52,10 +51,8 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
|||
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(NavigationFileResolver.class);
|
||||
|
||||
private static final String CATEGORY_PATH_ATTR =
|
||||
NavigationFileResolver.class + ".categoryPath";
|
||||
|
||||
// path is set in a cookie, which navigation models may use if they wish
|
||||
public static final String PATH_COOKIE_NAME = "ad_path";
|
||||
public static final char PATH_COOKIE_SEPARATOR = '|';
|
||||
|
|
@ -143,8 +140,7 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
|||
cats.add(parents.getCategory());
|
||||
}
|
||||
|
||||
Category[] catsArray = (Category[])
|
||||
cats.toArray(new Category[cats.size()]);
|
||||
Category[] catsArray = (Category[]) cats.toArray(new Category[cats.size()]);
|
||||
|
||||
sreq.setAttribute(CATEGORY_PATH_ATTR,
|
||||
catsArray);
|
||||
|
|
@ -226,10 +222,6 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static Category[] getCategoryPath(HttpServletRequest req) {
|
||||
return (Category[]) req.getAttribute(CATEGORY_PATH_ATTR);
|
||||
}
|
||||
|
|
@ -255,12 +247,9 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
|||
useContext);
|
||||
}
|
||||
// If there's an explicit use context which doesn't exist, give a 404
|
||||
if (!Template.DEFAULT_USE_CONTEXT.equals( useContext ) &&
|
||||
null == template) {
|
||||
s_log.debug("No template found in context " +
|
||||
getTemplateContext() + " for category " +
|
||||
cat.getID() + " with use context " +
|
||||
useContext );
|
||||
if (!Template.DEFAULT_USE_CONTEXT.equals(useContext) && null == template) {
|
||||
s_log.debug("No template found in context " + getTemplateContext() + " for category " + cat.getID()
|
||||
+ " with use context " + useContext);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -309,12 +298,11 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
|||
return root;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* category resolution retained as an instance method to
|
||||
* allow it to be overridden. Default functionality
|
||||
* contained in static resolveCategory method
|
||||
* category resolution retained as an instance method to allow it to be overridden. Default functionality contained
|
||||
* in static resolveCategory method
|
||||
*
|
||||
* @param root
|
||||
* @param path
|
||||
* @return
|
||||
|
|
@ -323,17 +311,12 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
|||
return NavigationFileResolver.resolveCategory(root, path);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Match a URL with the category tree and return the requested
|
||||
* category if exists.
|
||||
* Match a URL with the category tree and return the requested category if exists.
|
||||
*
|
||||
* Quasimodo:
|
||||
* Originally addEqualsFilter has been used to filter the
|
||||
* appropriate category directly inside the SQL query. This is
|
||||
* possible anymore due to the localised URLs of the new
|
||||
* localised categories (or at least: not found it).
|
||||
* Therefore we do the filtering in Java now.
|
||||
* Quasimodo: Originally addEqualsFilter has been used to filter the appropriate category directly inside the SQL
|
||||
* query. This is possible anymore due to the localised URLs of the new localised categories (or at least: not found
|
||||
* it). Therefore we do the filtering in Java now.
|
||||
*
|
||||
*/
|
||||
public static Category[] resolveCategory(Category root,
|
||||
|
|
|
|||
Loading…
Reference in New Issue