Diverse Formatierungen und Kommentierungen.

git-svn-id: https://svn.libreccm.org/ccm/trunk@578 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2010-10-17 11:08:57 +00:00
parent 35e1114491
commit 19aa607371
15 changed files with 120 additions and 98 deletions

View File

@ -42,10 +42,6 @@ import com.arsdigita.runtime.DomainInitEvent;
* @version $Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $ * @version $Id: Initializer.java 755 2005-09-02 13:42:47Z sskracic $
*/ */
public class Initializer extends CompoundInitializer { 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() { public Initializer() {
final String url = RuntimeConfig.getConfig().getJDBCURL(); final String url = RuntimeConfig.getConfig().getJDBCURL();

View File

@ -44,10 +44,6 @@ import org.apache.log4j.Logger;
* @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: Loader.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public class Loader extends PackageLoader { 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); private static final Logger s_log = Logger.getLogger(Loader.class);

View File

@ -30,11 +30,11 @@ package com.arsdigita.kernel;
* </font> * </font>
* *
* @see PackageType#addListener * @see PackageType#addListener
* @version $Revision: #7 $, $Date: 2004/08/16 $
* @since ACS 5.0 * @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 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 * Called when a package instance is mounted on a

View File

@ -55,12 +55,9 @@ import org.apache.log4j.Logger;
* *
* @author Dan Berrange * @author Dan Berrange
* @author Justin Ross &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
* @version $Id: Templating.java 1498 2007-03-19 16:22:15Z apevec $
*/ */
public class Templating { 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); private static final Logger s_log = Logger.getLogger(Templating.class);

View File

@ -27,12 +27,9 @@ import org.apache.log4j.Logger;
/** /**
* @author Justin Ross * @author Justin Ross
* @version $Id: TemplatingConfig.java 287 2005-02-22 00:29:02Z sskracic $
*/ */
public final class TemplatingConfig extends AbstractConfig { 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 private static final Logger s_log = Logger.getLogger
(TemplatingConfig.class); (TemplatingConfig.class);

View File

@ -101,14 +101,18 @@ public class Application extends Resource {
} }
/** /**
* create application without parent, and without an associated * Create (new style / legacy free) application without parent, and without
* container group * an associated container group
*/ */
public static Application createRootApplication(final ApplicationType type, public static Application createRootApplication(final ApplicationType type,
final String title) { final String title) {
return Application.createRootApplication(type, title, false); 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, public static Application createRootApplication(final ApplicationType type,
final String title, final String title,
final boolean createContainerGroup) { final boolean createContainerGroup) {
@ -172,6 +176,15 @@ public class Application extends Resource {
return Application.createApplication(type,fragment,title,parent,createContainerGroup); 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, private static Application make(final ApplicationType type,
final String fragment, final String fragment,
final String title, final String title,

View File

@ -297,6 +297,7 @@ public class ApplicationSetup {
notice(" DispatcherClass: " + m_dispatcherClass); notice(" DispatcherClass: " + m_dispatcherClass);
if (m_key == null && m_packageType == null) { if (m_key == null && m_packageType == null) {
// This is a new style / legacy free application
applicationType = new ApplicationType(m_title, m_typeName); applicationType = new ApplicationType(m_title, m_typeName);
} else { } else {
// This is a legacy application type. // This is a legacy application type.

View File

@ -56,7 +56,7 @@ public class ApplicationType extends ResourceType {
/** /**
* The fully qualified model name of the underlying data object, which in * 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 = public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.web.ApplicationType"; "com.arsdigita.web.ApplicationType";
@ -65,7 +65,10 @@ public class ApplicationType extends ResourceType {
boolean m_legacyFree = false; 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 * @param dataObject
*/ */
@ -84,11 +87,19 @@ public class ApplicationType extends ResourceType {
} }
/**
* Internal constructor creates a (new) legacy free application type.
*
* @param objectType
* @param title
* @param applicationObjectType
* @param createContainerGroup
*/
protected ApplicationType(final String objectType, protected ApplicationType(final String objectType,
final String title, final String title,
final String applicationObjectType, final String applicationObjectType,
final boolean createContainerGroup) { final boolean createContainerGroup) {
this(objectType); this(objectType); // creates and returns an empty data object
Assert.exists(title, "String title"); Assert.exists(title, "String title");
Assert.exists(applicationObjectType, "String applicationObjectType"); Assert.exists(applicationObjectType, "String applicationObjectType");
@ -112,6 +123,8 @@ public class ApplicationType extends ResourceType {
// (to be honest I can't remember the problem that was // (to be honest I can't remember the problem that was
// causing, but it did cause a problem in some // 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() { public void initialize() {
super.initialize(); super.initialize();
s_log.debug("initialising application type "); s_log.debug("initialising application type ");
@ -155,6 +168,7 @@ public class ApplicationType extends ResourceType {
} }
protected ApplicationType(final String dataObjectType, protected ApplicationType(final String dataObjectType,
final PackageType packageType, final PackageType packageType,
final String title, final String title,
@ -180,10 +194,11 @@ public class ApplicationType extends ResourceType {
/** /**
* Creates a legacy-compatible application type using the passed * Creates a legacy-compatible application type using the passed
* in package type. * in package type using an internal constructor (below).
*/ */
public static ApplicationType createApplicationType public static ApplicationType createApplicationType(PackageType packageType,
(PackageType packageType, String title, String applicationObjectType) { String title,
String applicationObjectType) {
return new ApplicationType return new ApplicationType
(BASE_DATA_OBJECT_TYPE, packageType, title, applicationObjectType); (BASE_DATA_OBJECT_TYPE, packageType, title, applicationObjectType);
} }
@ -192,14 +207,23 @@ public class ApplicationType extends ResourceType {
* Creates a legacy-compatible application type. The key * Creates a legacy-compatible application type. The key
* parameter is used to create a legacy package type to back the * parameter is used to create a legacy package type to back the
* new application type. * new application type.
* This variant is applicatable if packageType does not already exist!
*/ */
protected ApplicationType protected ApplicationType(String dataObjectType, String key, String title,
(String dataObjectType, String key, String title,
String applicationObjectType) { String applicationObjectType) {
this(dataObjectType, makePackageType(key, title), title, this(dataObjectType, makePackageType(key, title), title,
applicationObjectType); 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) { private static final PackageType makePackageType(String key, String title) {
PackageType packageType = new PackageType(); 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 * parameter is used to create a legacy package type to back the
* new application type. * new application type.
*/ */
public static ApplicationType createApplicationType public static ApplicationType createApplicationType(String key, String title,
(String key, String title, String applicationObjectType) { String applicationObjectType) {
return ApplicationType.createApplicationType( return ApplicationType.createApplicationType(
key, title, applicationObjectType, false); key, title, applicationObjectType, false);
@ -250,6 +274,7 @@ public class ApplicationType extends ResourceType {
(BASE_DATA_OBJECT_TYPE, key, title, applicationObjectType); (BASE_DATA_OBJECT_TYPE, key, title, applicationObjectType);
} }
} }
// Param // Param
public static ApplicationType retrieveApplicationType(BigDecimal id) { public static ApplicationType retrieveApplicationType(BigDecimal id) {
Assert.exists(id, "id"); Assert.exists(id, "id");

View File

@ -37,10 +37,6 @@ import org.apache.log4j.Logger;
* @version $Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $ * @version $Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $
*/ */
public class Loader extends PackageLoader { 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); private static final Logger s_log = Logger.getLogger(Loader.class);

View File

@ -1,6 +1,7 @@
package com.arsdigita.london.navigation; package com.arsdigita.london.navigation;
public class NavigationConstants { public class NavigationConstants {
public static final String NAV_NS = public static final String NAV_NS =
"http://ccm.redhat.com/london/navigation"; "http://ccm.redhat.com/london/navigation";
public static final String NAV_PREFIX = "nav"; public static final String NAV_PREFIX = "nav";
@ -8,4 +9,5 @@ public class NavigationConstants {
"com.arsdigita.london.navigation.DefaultContentSection"; "com.arsdigita.london.navigation.DefaultContentSection";
public static final String OID = "oid"; public static final String OID = "oid";
} }

View File

@ -89,6 +89,7 @@ public class Workspace extends Application {
*/ */
private static Workspace defaultHomepageWorkspace = null; private static Workspace defaultHomepageWorkspace = null;
/** /**
* Constructor * Constructor
* @param obj * @param obj
@ -103,7 +104,6 @@ public class Workspace extends Application {
* @throws com.arsdigita.domain.DataObjectNotFoundException * @throws com.arsdigita.domain.DataObjectNotFoundException
*/ */
public Workspace(OID oid) throws DataObjectNotFoundException { public Workspace(OID oid) throws DataObjectNotFoundException {
super(oid); super(oid);
} }

View File

@ -18,7 +18,7 @@
package com.arsdigita.london.rss; package com.arsdigita.london.rss;
import com.arsdigita.domain.DomainObjectInstantiator; // import com.arsdigita.domain.DomainObjectInstantiator;
import com.arsdigita.db.DbHelper; import com.arsdigita.db.DbHelper;
import com.arsdigita.domain.DomainObject; 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 &lt;jross@redhat.com&gt; * @author Justin Ross &lt;jross@redhat.com&gt;
* @version $Id: Initializer.java 758 2005-09-02 14:26:56Z sskracic $ * @version $Id: Initializer.java 758 2005-09-02 14:26:56Z sskracic $

View File

@ -46,7 +46,6 @@ public class Loader extends PackageLoader {
loadWorkspaceDirectoryPortlet(); loadWorkspaceDirectoryPortlet();
} }
}.run(); }.run();
// Nada yet
} }
private void loadWorkspaceDirectoryPortlet() { private void loadWorkspaceDirectoryPortlet() {