Diverse Formatierungen und Kommentierungen.
git-svn-id: https://svn.libreccm.org/ccm/trunk@578 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
35e1114491
commit
19aa607371
|
|
@ -42,10 +42,6 @@ import com.arsdigita.runtime.DomainInitEvent;
|
|||
* @version $Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $
|
||||
*/
|
||||
public class Initializer extends CompoundInitializer {
|
||||
public final static String versionId =
|
||||
"$Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
"$DateTime: 2004/01/23 10:22:44 $";
|
||||
|
||||
public Initializer() {
|
||||
final String url = RuntimeConfig.getConfig().getJDBCURL();
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@ import org.apache.log4j.Logger;
|
|||
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
*/
|
||||
public class Loader extends PackageLoader {
|
||||
public final static String versionId =
|
||||
"$Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
"$DateTime: 2004/01/23 10:22:44 $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(Loader.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ package com.arsdigita.kernel;
|
|||
* </font>
|
||||
*
|
||||
* @see PackageType#addListener
|
||||
* @version $Revision: #7 $, $Date: 2004/08/16 $
|
||||
* @since ACS 5.0
|
||||
* @version $Revision: #7 $, $Date: 2004/08/16 $
|
||||
* @version $Id: PackageEventListener.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
*/
|
||||
public interface PackageEventListener {
|
||||
public static final String versionId = "$Id: PackageEventListener.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2004/08/16 18:10:38 $";
|
||||
|
||||
/**
|
||||
* Called when a package instance is mounted on a
|
||||
|
|
|
|||
|
|
@ -55,12 +55,9 @@ import org.apache.log4j.Logger;
|
|||
*
|
||||
* @author Dan Berrange
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @version $Id: Templating.java 1498 2007-03-19 16:22:15Z apevec $
|
||||
*/
|
||||
public class Templating {
|
||||
public static final String versionId =
|
||||
"$Id: Templating.java 1498 2007-03-19 16:22:15Z apevec $" +
|
||||
"$Author: apevec $" +
|
||||
"$DateTime: 2004/08/16 18:10:38 $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(Templating.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,9 @@ import org.apache.log4j.Logger;
|
|||
|
||||
/**
|
||||
* @author Justin Ross
|
||||
* @version $Id: TemplatingConfig.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
*/
|
||||
public final class TemplatingConfig extends AbstractConfig {
|
||||
public static final String versionId =
|
||||
"$Id: TemplatingConfig.java 287 2005-02-22 00:29:02Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
"$DateTime: 2004/08/16 18:10:38 $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger
|
||||
(TemplatingConfig.class);
|
||||
|
|
|
|||
|
|
@ -101,14 +101,18 @@ public class Application extends Resource {
|
|||
}
|
||||
|
||||
/**
|
||||
* create application without parent, and without an associated
|
||||
* container group
|
||||
* Create (new style / legacy free) application without parent, and without
|
||||
* an associated container group
|
||||
*/
|
||||
public static Application createRootApplication(final ApplicationType type,
|
||||
final String title) {
|
||||
return Application.createRootApplication(type, title, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create (new style / legacy free) application without parent and with
|
||||
* an associated container group
|
||||
*/
|
||||
public static Application createRootApplication(final ApplicationType type,
|
||||
final String title,
|
||||
final boolean createContainerGroup) {
|
||||
|
|
@ -172,6 +176,15 @@ public class Application extends Resource {
|
|||
return Application.createApplication(type,fragment,title,parent,createContainerGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type application type
|
||||
* @param fragment last part of the applications URL
|
||||
* @param title descriptive name
|
||||
* @param parent
|
||||
* @param createContainerGroup
|
||||
* @return
|
||||
*/
|
||||
private static Application make(final ApplicationType type,
|
||||
final String fragment,
|
||||
final String title,
|
||||
|
|
|
|||
|
|
@ -297,6 +297,7 @@ public class ApplicationSetup {
|
|||
notice(" DispatcherClass: " + m_dispatcherClass);
|
||||
|
||||
if (m_key == null && m_packageType == null) {
|
||||
// This is a new style / legacy free application
|
||||
applicationType = new ApplicationType(m_title, m_typeName);
|
||||
} else {
|
||||
// This is a legacy application type.
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class ApplicationType extends ResourceType {
|
|||
|
||||
/**
|
||||
* The fully qualified model name of the underlying data object, which in
|
||||
* this case is the same as the Java type.
|
||||
* this case is the same as the Java type (full qualified class name).
|
||||
*/
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.web.ApplicationType";
|
||||
|
|
@ -65,7 +65,10 @@ public class ApplicationType extends ResourceType {
|
|||
boolean m_legacyFree = false;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* Constructor creates a new ApplicationType instance to encapsulate a given
|
||||
* data object (@see com.arsdigita.persistence.Session#retrieve(String) ).
|
||||
* The super implementation uses overwritable methods initialize() and
|
||||
* postInitialization() to further process the dataObject (see below).
|
||||
*
|
||||
* @param dataObject
|
||||
*/
|
||||
|
|
@ -82,13 +85,21 @@ public class ApplicationType extends ResourceType {
|
|||
final String applicationObjectType) {
|
||||
this(objectType, title, applicationObjectType, false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal constructor creates a (new) legacy free application type.
|
||||
*
|
||||
* @param objectType
|
||||
* @param title
|
||||
* @param applicationObjectType
|
||||
* @param createContainerGroup
|
||||
*/
|
||||
protected ApplicationType(final String objectType,
|
||||
final String title,
|
||||
final String applicationObjectType,
|
||||
final boolean createContainerGroup) {
|
||||
this(objectType);
|
||||
this(objectType); // creates and returns an empty data object
|
||||
|
||||
Assert.exists(title, "String title");
|
||||
Assert.exists(applicationObjectType, "String applicationObjectType");
|
||||
|
|
@ -111,7 +122,9 @@ public class ApplicationType extends ResourceType {
|
|||
// previously only set on creation of application type
|
||||
// (to be honest I can't remember the problem that was
|
||||
// causing, but it did cause a problem in some
|
||||
// circumstances)
|
||||
// circumstances)
|
||||
// Method overwrtes a (overwritable) method provided by the super class to
|
||||
// process a created (empty) data object.
|
||||
public void initialize() {
|
||||
super.initialize();
|
||||
s_log.debug("initialising application type ");
|
||||
|
|
@ -155,6 +168,7 @@ public class ApplicationType extends ResourceType {
|
|||
|
||||
}
|
||||
|
||||
|
||||
protected ApplicationType(final String dataObjectType,
|
||||
final PackageType packageType,
|
||||
final String title,
|
||||
|
|
@ -180,10 +194,11 @@ public class ApplicationType extends ResourceType {
|
|||
|
||||
/**
|
||||
* Creates a legacy-compatible application type using the passed
|
||||
* in package type.
|
||||
* in package type using an internal constructor (below).
|
||||
*/
|
||||
public static ApplicationType createApplicationType
|
||||
(PackageType packageType, String title, String applicationObjectType) {
|
||||
public static ApplicationType createApplicationType(PackageType packageType,
|
||||
String title,
|
||||
String applicationObjectType) {
|
||||
return new ApplicationType
|
||||
(BASE_DATA_OBJECT_TYPE, packageType, title, applicationObjectType);
|
||||
}
|
||||
|
|
@ -192,14 +207,23 @@ public class ApplicationType extends ResourceType {
|
|||
* Creates a legacy-compatible application type. The key
|
||||
* parameter is used to create a legacy package type to back the
|
||||
* new application type.
|
||||
* This variant is applicatable if packageType does not already exist!
|
||||
*/
|
||||
protected ApplicationType
|
||||
(String dataObjectType, String key, String title,
|
||||
String applicationObjectType) {
|
||||
protected ApplicationType(String dataObjectType, String key, String title,
|
||||
String applicationObjectType) {
|
||||
this(dataObjectType, makePackageType(key, title), title,
|
||||
applicationObjectType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to create a packageType for a new legacy compatible
|
||||
* application type without a already existing (i.e. installed in db) legacy
|
||||
* application.
|
||||
*
|
||||
* @param key of the package to be created
|
||||
* @param title of the package to be created
|
||||
* @return
|
||||
*/
|
||||
private static final PackageType makePackageType(String key, String title) {
|
||||
PackageType packageType = new PackageType();
|
||||
|
||||
|
|
@ -218,8 +242,8 @@ public class ApplicationType extends ResourceType {
|
|||
* parameter is used to create a legacy package type to back the
|
||||
* new application type.
|
||||
*/
|
||||
public static ApplicationType createApplicationType
|
||||
(String key, String title, String applicationObjectType) {
|
||||
public static ApplicationType createApplicationType(String key, String title,
|
||||
String applicationObjectType) {
|
||||
|
||||
return ApplicationType.createApplicationType(
|
||||
key, title, applicationObjectType, false);
|
||||
|
|
@ -250,6 +274,7 @@ public class ApplicationType extends ResourceType {
|
|||
(BASE_DATA_OBJECT_TYPE, key, title, applicationObjectType);
|
||||
}
|
||||
}
|
||||
|
||||
// Param
|
||||
public static ApplicationType retrieveApplicationType(BigDecimal id) {
|
||||
Assert.exists(id, "id");
|
||||
|
|
|
|||
|
|
@ -37,10 +37,6 @@ import org.apache.log4j.Logger;
|
|||
* @version $Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $
|
||||
*/
|
||||
public class Loader extends PackageLoader {
|
||||
public final static String versionId =
|
||||
"$Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
"$DateTime: 2003/10/28 14:21:31 $";
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(Loader.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class Loader extends PackageLoader {
|
||||
|
||||
/** Creates a s_logging category with name = full name of class */
|
||||
/** Creates a s_logging category with name = full name of class */
|
||||
private static final Logger s_log = Logger.getLogger(Loader.class);
|
||||
|
||||
private StringParameter m_templatesFile = new StringParameter(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.arsdigita.london.navigation;
|
||||
|
||||
public class NavigationConstants {
|
||||
|
||||
public static final String NAV_NS =
|
||||
"http://ccm.redhat.com/london/navigation";
|
||||
public static final String NAV_PREFIX = "nav";
|
||||
|
|
@ -8,4 +9,5 @@ public class NavigationConstants {
|
|||
"com.arsdigita.london.navigation.DefaultContentSection";
|
||||
|
||||
public static final String OID = "oid";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ public class Initializer extends CompoundInitializer {
|
|||
|
||||
super.init(e);
|
||||
|
||||
XML.parse(Workspace.getConfig().getTraversalAdapters(),
|
||||
new TraversalHandler());
|
||||
XML.parse(Workspace.getConfig().getTraversalAdapters(),
|
||||
new TraversalHandler());
|
||||
|
||||
e.getFactory().registerInstantiator(
|
||||
Workspace.BASE_DATA_OBJECT_TYPE,
|
||||
|
|
|
|||
|
|
@ -89,39 +89,39 @@ public class Workspace extends Application {
|
|||
*/
|
||||
private static Workspace defaultHomepageWorkspace = null;
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param obj
|
||||
*/
|
||||
public Workspace(DataObject obj) {
|
||||
super(obj);
|
||||
}
|
||||
super(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Constructor, retrieves the workspace from database using its OID
|
||||
* @param oid
|
||||
* @throws com.arsdigita.domain.DataObjectNotFoundException
|
||||
*/
|
||||
public Workspace(OID oid) throws DataObjectNotFoundException {
|
||||
super(oid);
|
||||
}
|
||||
|
||||
super(oid);
|
||||
}
|
||||
/*
|
||||
* public String getContextPath() { return "ccm-ldn-portal"; }
|
||||
*/
|
||||
|
||||
/*
|
||||
* public String getContextPath() { return "ccm-ldn-portal"; }
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @return ServletPath (constant) probably should be synchron with web.xml
|
||||
* entry
|
||||
*/
|
||||
public String getServletPath() {
|
||||
// return "/files";
|
||||
return "/ccm-ldn-portal/files";
|
||||
}
|
||||
// return "/files";
|
||||
return "/ccm-ldn-portal/files";
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Wrapper class to handle a limited set of parameters,
|
||||
* here: page layout is set to default layout.
|
||||
*
|
||||
|
|
@ -132,12 +132,12 @@ public class Workspace extends Application {
|
|||
* @return
|
||||
*/
|
||||
public static Workspace createWorkspace(String url, String title,
|
||||
Application parent, boolean isPublic) {
|
||||
return createWorkspace(url, title, PageLayout.getDefaultLayout(),
|
||||
parent, isPublic);
|
||||
}
|
||||
Application parent, boolean isPublic) {
|
||||
return createWorkspace(url, title, PageLayout.getDefaultLayout(),
|
||||
parent, isPublic);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @param url
|
||||
* @param title
|
||||
|
|
@ -146,12 +146,12 @@ public class Workspace extends Application {
|
|||
* @return
|
||||
*/
|
||||
public static Workspace createWorkspace(String url, String title,
|
||||
Application parent, User owner) {
|
||||
return createWorkspace(url, title, PageLayout.getDefaultLayout(),
|
||||
parent, owner);
|
||||
}
|
||||
Application parent, User owner) {
|
||||
return createWorkspace(url, title, PageLayout.getDefaultLayout(),
|
||||
parent, owner);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Does the real work to create a workspace in the storage (db)
|
||||
*
|
||||
* @param url
|
||||
|
|
@ -177,7 +177,7 @@ public class Workspace extends Application {
|
|||
return workspace;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Does the real work to create a workspace in the storage (db)
|
||||
*
|
||||
* @param url
|
||||
|
|
@ -239,31 +239,31 @@ public class Workspace extends Application {
|
|||
|
||||
}
|
||||
|
||||
public void beforeSave() {
|
||||
// If no permissions are configured, then setup empty groups
|
||||
if (get(PARTY) == null) {
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("No party is set, creating shared workspace "
|
||||
+ getOID());
|
||||
}
|
||||
setupGroups(getTitle(), false);
|
||||
}
|
||||
// Setup the default layout.
|
||||
if (isNew() && getDefaultLayout() == null) {
|
||||
setDefaultLayout(PageLayout.getDefaultLayout());
|
||||
}
|
||||
super.beforeSave();
|
||||
}
|
||||
public void beforeSave() {
|
||||
// If no permissions are configured, then setup empty groups
|
||||
if (get(PARTY) == null) {
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("No party is set, creating shared workspace "
|
||||
+ getOID());
|
||||
}
|
||||
setupGroups(getTitle(), false);
|
||||
}
|
||||
// Setup the default layout.
|
||||
if (isNew() && getDefaultLayout() == null) {
|
||||
setDefaultLayout(PageLayout.getDefaultLayout());
|
||||
}
|
||||
super.beforeSave();
|
||||
}
|
||||
|
||||
// public void beforeDelete() {
|
||||
// super.beforeDelete();
|
||||
// Category.clearRootForObject(this);
|
||||
// }
|
||||
// public void beforeDelete() {
|
||||
// super.beforeDelete();
|
||||
// Category.clearRootForObject(this);
|
||||
// }
|
||||
|
||||
// This method wouldn't need to exist if permissioning used
|
||||
// the associations rather than direct queries which require
|
||||
// the object to be saved
|
||||
public void afterSave() {
|
||||
// This method wouldn't need to exist if permissioning used
|
||||
// the associations rather than direct queries which require
|
||||
// the object to be saved
|
||||
public void afterSave() {
|
||||
super.afterSave();
|
||||
|
||||
Party party = getParty();
|
||||
|
|
@ -302,9 +302,9 @@ public class Workspace extends Application {
|
|||
WorkspacePage page = pages.getPage();
|
||||
PermissionService.setContext(page, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setupGroups(String title, boolean isPublic) {
|
||||
private void setupGroups(String title, boolean isPublic) {
|
||||
Group members = new Group();
|
||||
members.setName(title);
|
||||
members.save();
|
||||
|
|
@ -336,11 +336,11 @@ public class Workspace extends Application {
|
|||
}
|
||||
|
||||
setParty(members);
|
||||
}
|
||||
}
|
||||
|
||||
public static WorkspaceCollection retrieveAll() {
|
||||
return retrieveAll(null);
|
||||
}
|
||||
public static WorkspaceCollection retrieveAll() {
|
||||
return retrieveAll(null);
|
||||
}
|
||||
|
||||
public static WorkspaceCollection retrieveAll(Application parent) {
|
||||
DataCollection wks = SessionManager.getSession().retrieve(
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
package com.arsdigita.london.rss;
|
||||
|
||||
import com.arsdigita.domain.DomainObjectInstantiator;
|
||||
// import com.arsdigita.domain.DomainObjectInstantiator;
|
||||
|
||||
import com.arsdigita.db.DbHelper;
|
||||
import com.arsdigita.domain.DomainObject;
|
||||
|
|
@ -63,7 +63,7 @@ import com.arsdigita.london.rss.portlet.WorkspaceDirectoryPortlet;
|
|||
|
||||
|
||||
/**
|
||||
* The CMS initializer.
|
||||
* The RSS initializer.
|
||||
*
|
||||
* @author Justin Ross <jross@redhat.com>
|
||||
* @version $Id: Initializer.java 758 2005-09-02 14:26:56Z sskracic $
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ public class Loader extends PackageLoader {
|
|||
loadWorkspaceDirectoryPortlet();
|
||||
}
|
||||
}.run();
|
||||
// Nada yet
|
||||
}
|
||||
|
||||
private void loadWorkspaceDirectoryPortlet() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue