From b645b42849ad7621f892bbd09594aca4e4cdfa88 Mon Sep 17 00:00:00 2001 From: pb Date: Sat, 24 Apr 2010 21:31:22 +0000 Subject: [PATCH] Formatierung. git-svn-id: https://svn.libreccm.org/ccm/trunk@390 8810af33-2d31-482b-a856-94f89814c4df --- .../src/WEB-INF/content-types/Template.xml | 28 +++--- ccm-cms/src/ccm-cms.config | 2 +- .../cms/ContentItemInstantiator.java | 1 + .../src/com/arsdigita/cms/ContentSection.java | 87 +++++++++---------- .../arsdigita/cms/DefaultDomainService.java | 3 + .../cms/dispatcher/ServiceDispatcher.java | 20 ++--- .../cms/installer/VersioningUpgrader.java | 8 ++ .../cms/installer/WorkspaceInstaller.java | 3 +- .../cms/publishToFile/Initializer.java | 29 +++---- .../com/arsdigita/cms/workflow/CMSTask.java | 3 + 10 files changed, 97 insertions(+), 87 deletions(-) diff --git a/ccm-cms/src/WEB-INF/content-types/Template.xml b/ccm-cms/src/WEB-INF/content-types/Template.xml index 0add35dbc..9230945ae 100755 --- a/ccm-cms/src/WEB-INF/content-types/Template.xml +++ b/ccm-cms/src/WEB-INF/content-types/Template.xml @@ -1,20 +1,28 @@ - - + + + + + descriptionBundle="com.arsdigita.cms.ui.CMSResources" + component="com.arsdigita.cms.ui.templates.TemplateEdit"/> + descriptionBundle="com.arsdigita.cms.ui.CMSResources" + component="com.arsdigita.cms.ui.templates.TemplateBody"/> diff --git a/ccm-cms/src/ccm-cms.config b/ccm-cms/src/ccm-cms.config index c51a47288..01e9a5697 100755 --- a/ccm-cms/src/ccm-cms.config +++ b/ccm-cms/src/ccm-cms.config @@ -5,5 +5,5 @@ + storage="ccm-cms/publishToFile.properties"/> diff --git a/ccm-cms/src/com/arsdigita/cms/ContentItemInstantiator.java b/ccm-cms/src/com/arsdigita/cms/ContentItemInstantiator.java index 4a28256d6..d95e89736 100755 --- a/ccm-cms/src/com/arsdigita/cms/ContentItemInstantiator.java +++ b/ccm-cms/src/com/arsdigita/cms/ContentItemInstantiator.java @@ -30,6 +30,7 @@ import com.arsdigita.persistence.DataObject; * * @author Stanislav Freidin * @version $Id: ContentItemInstantiator.java 287 2005-02-22 00:29:02Z sskracic $ + * * @deprecated Use {@link com.arsdigita.kernel.ACSObjectInstantiator} * instead */ diff --git a/ccm-cms/src/com/arsdigita/cms/ContentSection.java b/ccm-cms/src/com/arsdigita/cms/ContentSection.java index ef6127cd7..ec4f589de 100755 --- a/ccm-cms/src/com/arsdigita/cms/ContentSection.java +++ b/ccm-cms/src/com/arsdigita/cms/ContentSection.java @@ -296,11 +296,11 @@ public class ContentSection extends Application { return sURL; } - /* + /** + * Gets the full path of the content section. * - * Gets the full path of the content section - * @return returns the path of this application including the dispatcher path. The path - * does not end in a slash. Does not return null + * @return returns the path of this application including the dispatcher path. + * The path does not end in a slash. Does not return null */ public String getFullPath() { return URL.getDispatcherPath() + getPath(); @@ -934,7 +934,7 @@ public class ContentSection extends Application { // PackageInstance pkg = node.getPackageInstance(); // if ( pkg == null ) { // throw new DataObjectNotFoundException( -// "No package instance for node_id=" + node.getID().toString()); +// "No package instance for node_id=" + node.getID().toString()); // } // // return getSectionFromPackage(pkg); @@ -1078,7 +1078,8 @@ public class ContentSection extends Application { // Create template root folder. Folder templates = new Folder(); templates.setName("templates"); - templates.setLabel( (String) GlobalizationUtil.globalize("cms.templates").localize()); + templates.setLabel( (String) GlobalizationUtil.globalize( + "cms.templates").localize()); templates.save(); //create and initialize the content section application @@ -1100,15 +1101,12 @@ public class ContentSection extends Application { } - /** - * Method create. Creates a default content section and returns it - * @param name Name of the content section - * @return ContentSection - */ - public static ContentSection create(final String name) { -// KernelExcursion rootExcursion = new KernelExcursion() { -// public void excurse() { -// setEffectiveParty(Kernel.getSystemParty()); + /** + * Method create. Creates a default content section and returns it + * @param name Name of the content section + * @return ContentSection + */ + public static ContentSection create(final String name) { Group staff = createStaffGroup(name); Folder folder = createRootFolder(name); @@ -1132,20 +1130,20 @@ public class ContentSection extends Application { xgc, trc); - // Set the default context on the root folder to - // the content section - PermissionService.setContext(folder.getOID(), section.getOID()); - createDefaultResources(section); -// } -// }; -// rootExcursion.run(); + // Set the default context on the root folder to + // the content section + PermissionService.setContext(folder.getOID(), section.getOID()); + createDefaultResources(section); +// } +// }; +// rootExcursion.run(); //now retrieve the created content section and return it -// return (ContentSection) Application.retrieveApplicationForPath("/" + name + "/"); +// return (ContentSection) Application.retrieveApplicationForPath("/" + name + "/"); return section; - } + } - /** + /** * Creates and maps default resources to the content section. * * @param section The content section @@ -1156,26 +1154,26 @@ public class ContentSection extends Application { */ protected static void createDefaultResources(ContentSection section) { - // XML resources - ResourceType rt = ResourceType.findResourceType("xml"); - Resource r = + // XML resources + ResourceType rt = ResourceType.findResourceType("xml"); + Resource r = rt.createInstance("com.arsdigita.cms.ui.ContentSectionPage"); - r.save(); - ResourceMapping rm = r.createInstance(section, "admin"); - rm.save(); - rm = r.createInstance(section, "admin/index"); - rm.save(); + r.save(); + ResourceMapping rm = r.createInstance(section, "admin"); + rm.save(); + rm = r.createInstance(section, "admin/index"); + rm.save(); - // XXX What's up with this? The class doesn't exist anymore. - //r = rt.createInstance("com.arsdigita.cms.user.ItemIndexPage"); - //r.save(); - //rm = r.createInstance(section, "index"); - //rm.save(); + // XXX What's up with this? The class doesn't exist anymore. + //r = rt.createInstance("com.arsdigita.cms.user.ItemIndexPage"); + //r.save(); + //rm = r.createInstance(section, "index"); + //rm.save(); - r = rt.createInstance("com.arsdigita.cms.ui.ContentItemPage"); - r.save(); - rm = r.createInstance(section, "admin/item"); - rm.save(); + r = rt.createInstance("com.arsdigita.cms.ui.ContentItemPage"); + r.save(); + rm = r.createInstance(section, "admin/item"); + rm.save(); } @@ -1202,12 +1200,13 @@ public class ContentSection extends Application { protected static Folder createRootFolder(String name) { Folder root = new Folder(); root.setName("/"); - root.setLabel( (String) GlobalizationUtil.globalize("cms.installer.root_folder").localize()); + root.setLabel( (String) GlobalizationUtil.globalize( + "cms.installer.root_folder").localize()); root.save(); return root; } - /** + /** * Creates the root category for a content section. * * @param name The name of the content section diff --git a/ccm-cms/src/com/arsdigita/cms/DefaultDomainService.java b/ccm-cms/src/com/arsdigita/cms/DefaultDomainService.java index 1a28f5ef8..e3866217d 100755 --- a/ccm-cms/src/com/arsdigita/cms/DefaultDomainService.java +++ b/ccm-cms/src/com/arsdigita/cms/DefaultDomainService.java @@ -28,5 +28,8 @@ import com.arsdigita.domain.DomainServiceInterfaceExposer; */ public class DefaultDomainService extends DomainServiceInterfaceExposer { +<<<<<<< .mine +======= +>>>>>>> .r389 } diff --git a/ccm-cms/src/com/arsdigita/cms/dispatcher/ServiceDispatcher.java b/ccm-cms/src/com/arsdigita/cms/dispatcher/ServiceDispatcher.java index b1b14b34c..4b365ed39 100755 --- a/ccm-cms/src/com/arsdigita/cms/dispatcher/ServiceDispatcher.java +++ b/ccm-cms/src/com/arsdigita/cms/dispatcher/ServiceDispatcher.java @@ -68,25 +68,19 @@ import java.util.Map; * * @author Michael Pih (pihman@arsdigita.com) * @version $Revision: #13 $ $DateTime: 2004/08/17 23:15:09 $ - * @version $Id: ServiceDispatcher.java 287 2005-02-22 00:29:02Z sskracic $ + * @version $Id: ServiceDispatcher.java 287 2005-02-22 00:29:02Z sskracic $ */ public class ServiceDispatcher extends LockableImpl implements Dispatcher { - /** - * The path of the file that maps resources. - */ - private final static String MAP_FILE = "WEB-INF/resources/cms-service-map.xml"; - - /** - * Error logging. - */ + /** Error logging. */ private static Logger s_log = Logger.getLogger(ServiceDispatcher.class.getName()); - /** - * Mapping between a relative URL and the class name of a - * ResourceHandler. - */ + + /** The path of the file that maps resources. */ + private final static String MAP_FILE = "WEB-INF/resources/cms-service-map.xml"; + + /** Mapping between a relative URL and the class name of a ResourceHandler. */ private static HashMap s_pageClasses = new HashMap(); /** diff --git a/ccm-cms/src/com/arsdigita/cms/installer/VersioningUpgrader.java b/ccm-cms/src/com/arsdigita/cms/installer/VersioningUpgrader.java index b37a48f0d..d893fbc0a 100755 --- a/ccm-cms/src/com/arsdigita/cms/installer/VersioningUpgrader.java +++ b/ccm-cms/src/com/arsdigita/cms/installer/VersioningUpgrader.java @@ -24,6 +24,14 @@ import com.arsdigita.persistence.DataQueryDataCollectionAdapter; import com.arsdigita.cms.ItemCollection; import com.arsdigita.cms.ContentItem; +// From Initializer.java: +// Update master object if upgrading from old versioning +// XXX: shouldn't we just gut this section (and +// VersioningUpgrader)? It is an upgrade fix from 5.1 or +// earlier, and relying on VersionedACSObject is +// deprecated +// (probably written by Michael Pih (pihman@arsdigita.com) ) + /** * VersioningUpgrader * diff --git a/ccm-cms/src/com/arsdigita/cms/installer/WorkspaceInstaller.java b/ccm-cms/src/com/arsdigita/cms/installer/WorkspaceInstaller.java index 152c4d8f0..32b411f86 100755 --- a/ccm-cms/src/com/arsdigita/cms/installer/WorkspaceInstaller.java +++ b/ccm-cms/src/com/arsdigita/cms/installer/WorkspaceInstaller.java @@ -83,7 +83,8 @@ public class WorkspaceInstaller implements PackageEventListener { // Register a stylesheet to the Content Center package. Stylesheet ss = - Stylesheet.createStylesheet("/packages/content-section/xsl/content-center.xsl"); + Stylesheet.createStylesheet( + "/packages/content-section/xsl/content-center.xsl"); ss.save(); type.addStylesheet(ss); diff --git a/ccm-cms/src/com/arsdigita/cms/publishToFile/Initializer.java b/ccm-cms/src/com/arsdigita/cms/publishToFile/Initializer.java index f5fea50c4..b9675f389 100755 --- a/ccm-cms/src/com/arsdigita/cms/publishToFile/Initializer.java +++ b/ccm-cms/src/com/arsdigita/cms/publishToFile/Initializer.java @@ -59,9 +59,7 @@ import org.apache.log4j.Logger; */ public class Initializer extends CompoundInitializer { - /** - * Creates a s_logging category with name = to the full name of class - */ + /** Creates a s_logging category with name = to the full name of class */ private static Logger s_log = Logger.getLogger(Initializer.class); private static PublishToFileConfig s_conf= PublishToFileConfig.getConfig(); @@ -70,18 +68,13 @@ public class Initializer extends CompoundInitializer { final String url = RuntimeConfig.getConfig().getJDBCURL(); final int database = DbHelper.getDatabaseFromURL(url); - // temporary solution for the time LegacyInitializer is not completely - // migrated to this Initializer - // add(new LegacyInitializer("com/arsdigita/cms/publishToFile/enterprise.init")); - - // s_conf = PublishToFileConfig.getConfig(); } - /** - * An empty implementation of {@link Initializer#init(DataInitEvent)}. - * - * @param evt The data init event. - */ +// /** +// * An empty implementation of {@link Initializer#init(DataInitEvent)}. +// * +// * @param evt The data init event. +// */ // public void init(DataInitEvent evt) { // } @@ -128,11 +121,11 @@ public class Initializer extends CompoundInitializer { } - /** - * An empty implementation of {@link Initializer#init(LegacyInitEvent)}. - * - * @param evt The legacy init event. - */ +// /** +// * An empty implementation of {@link Initializer#init(LegacyInitEvent)}. +// * +// * @param evt The legacy init event. +// */ // An empty implementations prevents this initializer from beiong executed. // A missing implementations causes the super class method to be executed, which // invokes the above added LegacyInitializer. diff --git a/ccm-cms/src/com/arsdigita/cms/workflow/CMSTask.java b/ccm-cms/src/com/arsdigita/cms/workflow/CMSTask.java index 820c31705..f4e7b4aef 100755 --- a/ccm-cms/src/com/arsdigita/cms/workflow/CMSTask.java +++ b/ccm-cms/src/com/arsdigita/cms/workflow/CMSTask.java @@ -97,6 +97,9 @@ public class CMSTask extends UserTask { private boolean m_authorOnly = false; + /** + * Constructor + */ public CMSTask() { this(BASE_DATA_OBJECT_TYPE); }