Formatierung.

git-svn-id: https://svn.libreccm.org/ccm/trunk@390 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2010-04-24 21:31:22 +00:00
parent 29db51e6a1
commit b645b42849
10 changed files with 97 additions and 87 deletions

View File

@ -1,20 +1,28 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> <ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
<ctd:content-type label="Template" description="Templates for rendering content items" objectType="com.arsdigita.cms.Template" classname="com.arsdigita.cms.Template" isInternal="yes"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
<ctd:content-type label="Template"
description="Templates for rendering content items"
objectType="com.arsdigita.cms.Template"
classname="com.arsdigita.cms.Template"
isInternal="yes">
<ctd:authoring-kit> <ctd:authoring-kit>
<ctd:authoring-step <ctd:authoring-step
labelKey="cms.contenttypes.shared.basic_properties.title" labelKey="cms.contenttypes.shared.basic_properties.title"
labelBundle="com.arsdigita.cms.ui.CMSResources" labelBundle="com.arsdigita.cms.ui.CMSResources"
descriptionKey="cms.contenttypes.shared.basic_properties.description" descriptionKey="cms.contenttypes.shared.basic_properties.description"
descriptionBundle="com.arsdigita.cms.ui.CMSResources" descriptionBundle="com.arsdigita.cms.ui.CMSResources"
component="com.arsdigita.cms.ui.templates.TemplateEdit"/> component="com.arsdigita.cms.ui.templates.TemplateEdit"/>
<ctd:authoring-step <ctd:authoring-step
labelKey="cms.contenttypes.template.body_text.title" labelKey="cms.contenttypes.template.body_text.title"
labelBundle="com.arsdigita.cms.ui.CMSResources" labelBundle="com.arsdigita.cms.ui.CMSResources"
descriptionKey="cms.contenttypes.template.body_text.description" descriptionKey="cms.contenttypes.template.body_text.description"
descriptionBundle="com.arsdigita.cms.ui.CMSResources" descriptionBundle="com.arsdigita.cms.ui.CMSResources"
component="com.arsdigita.cms.ui.templates.TemplateBody"/> component="com.arsdigita.cms.ui.templates.TemplateBody"/>
</ctd:authoring-kit> </ctd:authoring-kit>
</ctd:content-type> </ctd:content-type>

View File

@ -5,5 +5,5 @@
<config class="com.arsdigita.cms.lifecycle.LifecycleConfig" <config class="com.arsdigita.cms.lifecycle.LifecycleConfig"
storage="ccm-cms/lifecycle.properties"/> storage="ccm-cms/lifecycle.properties"/>
<config class="com.arsdigita.cms.publishToFile.PublishToFileConfig" <config class="com.arsdigita.cms.publishToFile.PublishToFileConfig"
storage="ccm-cms/lifecycle.properties"/> storage="ccm-cms/publishToFile.properties"/>
</registry> </registry>

View File

@ -30,6 +30,7 @@ import com.arsdigita.persistence.DataObject;
* *
* @author <a href="mailto:sfreidin@arsdigita.com">Stanislav Freidin</a> * @author <a href="mailto:sfreidin@arsdigita.com">Stanislav Freidin</a>
* @version $Id: ContentItemInstantiator.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: ContentItemInstantiator.java 287 2005-02-22 00:29:02Z sskracic $
*
* @deprecated Use {@link com.arsdigita.kernel.ACSObjectInstantiator} * @deprecated Use {@link com.arsdigita.kernel.ACSObjectInstantiator}
* instead * instead
*/ */

View File

@ -296,11 +296,11 @@ public class ContentSection extends Application {
return sURL; 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.
* @return returns the path of this application including the dispatcher path. The path * The path does not end in a slash. Does not return null
* does not end in a slash. Does not return null
*/ */
public String getFullPath() { public String getFullPath() {
return URL.getDispatcherPath() + getPath(); return URL.getDispatcherPath() + getPath();
@ -934,7 +934,7 @@ public class ContentSection extends Application {
// PackageInstance pkg = node.getPackageInstance(); // PackageInstance pkg = node.getPackageInstance();
// if ( pkg == null ) { // if ( pkg == null ) {
// throw new DataObjectNotFoundException( // throw new DataObjectNotFoundException(
// "No package instance for node_id=" + node.getID().toString()); // "No package instance for node_id=" + node.getID().toString());
// } // }
// //
// return getSectionFromPackage(pkg); // return getSectionFromPackage(pkg);
@ -1078,7 +1078,8 @@ public class ContentSection extends Application {
// Create template root folder. // Create template root folder.
Folder templates = new Folder(); Folder templates = new Folder();
templates.setName("templates"); templates.setName("templates");
templates.setLabel( (String) GlobalizationUtil.globalize("cms.templates").localize()); templates.setLabel( (String) GlobalizationUtil.globalize(
"cms.templates").localize());
templates.save(); templates.save();
//create and initialize the content section application //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 * Method create. Creates a default content section and returns it
* @param name Name of the content section * @param name Name of the content section
* @return ContentSection * @return ContentSection
*/ */
public static ContentSection create(final String name) { public static ContentSection create(final String name) {
// KernelExcursion rootExcursion = new KernelExcursion() {
// public void excurse() {
// setEffectiveParty(Kernel.getSystemParty());
Group staff = createStaffGroup(name); Group staff = createStaffGroup(name);
Folder folder = createRootFolder(name); Folder folder = createRootFolder(name);
@ -1132,20 +1130,20 @@ public class ContentSection extends Application {
xgc, xgc,
trc); trc);
// Set the default context on the root folder to // Set the default context on the root folder to
// the content section // the content section
PermissionService.setContext(folder.getOID(), section.getOID()); PermissionService.setContext(folder.getOID(), section.getOID());
createDefaultResources(section); createDefaultResources(section);
// } // }
// }; // };
// rootExcursion.run(); // rootExcursion.run();
//now retrieve the created content section and return it //now retrieve the created content section and return it
// return (ContentSection) Application.retrieveApplicationForPath("/" + name + "/"); // return (ContentSection) Application.retrieveApplicationForPath("/" + name + "/");
return section; return section;
} }
/** /**
* Creates and maps default resources to the content section. * Creates and maps default resources to the content section.
* *
* @param section The content section * @param section The content section
@ -1156,26 +1154,26 @@ public class ContentSection extends Application {
*/ */
protected static void createDefaultResources(ContentSection section) { protected static void createDefaultResources(ContentSection section) {
// XML resources // XML resources
ResourceType rt = ResourceType.findResourceType("xml"); ResourceType rt = ResourceType.findResourceType("xml");
Resource r = Resource r =
rt.createInstance("com.arsdigita.cms.ui.ContentSectionPage"); rt.createInstance("com.arsdigita.cms.ui.ContentSectionPage");
r.save(); r.save();
ResourceMapping rm = r.createInstance(section, "admin"); ResourceMapping rm = r.createInstance(section, "admin");
rm.save(); rm.save();
rm = r.createInstance(section, "admin/index"); rm = r.createInstance(section, "admin/index");
rm.save(); rm.save();
// XXX What's up with this? The class doesn't exist anymore. // XXX What's up with this? The class doesn't exist anymore.
//r = rt.createInstance("com.arsdigita.cms.user.ItemIndexPage"); //r = rt.createInstance("com.arsdigita.cms.user.ItemIndexPage");
//r.save(); //r.save();
//rm = r.createInstance(section, "index"); //rm = r.createInstance(section, "index");
//rm.save(); //rm.save();
r = rt.createInstance("com.arsdigita.cms.ui.ContentItemPage"); r = rt.createInstance("com.arsdigita.cms.ui.ContentItemPage");
r.save(); r.save();
rm = r.createInstance(section, "admin/item"); rm = r.createInstance(section, "admin/item");
rm.save(); rm.save();
} }
@ -1202,12 +1200,13 @@ public class ContentSection extends Application {
protected static Folder createRootFolder(String name) { protected static Folder createRootFolder(String name) {
Folder root = new Folder(); Folder root = new Folder();
root.setName("/"); root.setName("/");
root.setLabel( (String) GlobalizationUtil.globalize("cms.installer.root_folder").localize()); root.setLabel( (String) GlobalizationUtil.globalize(
"cms.installer.root_folder").localize());
root.save(); root.save();
return root; return root;
} }
/** /**
* Creates the root category for a content section. * Creates the root category for a content section.
* *
* @param name The name of the content section * @param name The name of the content section

View File

@ -28,5 +28,8 @@ import com.arsdigita.domain.DomainServiceInterfaceExposer;
*/ */
public class DefaultDomainService extends DomainServiceInterfaceExposer { public class DefaultDomainService extends DomainServiceInterfaceExposer {
<<<<<<< .mine
=======
>>>>>>> .r389
} }

View File

@ -68,25 +68,19 @@ import java.util.Map;
* *
* @author Michael Pih (pihman@arsdigita.com) * @author Michael Pih (pihman@arsdigita.com)
* @version $Revision: #13 $ $DateTime: 2004/08/17 23:15:09 $ * @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 { public class ServiceDispatcher extends LockableImpl implements Dispatcher {
/** /** Error logging. */
* The path of the file that maps resources.
*/
private final static String MAP_FILE = "WEB-INF/resources/cms-service-map.xml";
/**
* Error logging.
*/
private static Logger s_log = private static Logger s_log =
Logger.getLogger(ServiceDispatcher.class.getName()); Logger.getLogger(ServiceDispatcher.class.getName());
/**
* Mapping between a relative URL and the class name of a /** The path of the file that maps resources. */
* ResourceHandler. 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(); private static HashMap s_pageClasses = new HashMap();
/** /**

View File

@ -24,6 +24,14 @@ import com.arsdigita.persistence.DataQueryDataCollectionAdapter;
import com.arsdigita.cms.ItemCollection; import com.arsdigita.cms.ItemCollection;
import com.arsdigita.cms.ContentItem; 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 * VersioningUpgrader
* *

View File

@ -83,7 +83,8 @@ public class WorkspaceInstaller implements PackageEventListener {
// Register a stylesheet to the Content Center package. // Register a stylesheet to the Content Center package.
Stylesheet ss = Stylesheet ss =
Stylesheet.createStylesheet("/packages/content-section/xsl/content-center.xsl"); Stylesheet.createStylesheet(
"/packages/content-section/xsl/content-center.xsl");
ss.save(); ss.save();
type.addStylesheet(ss); type.addStylesheet(ss);

View File

@ -59,9 +59,7 @@ import org.apache.log4j.Logger;
*/ */
public class Initializer extends CompoundInitializer { 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 Logger s_log = Logger.getLogger(Initializer.class);
private static PublishToFileConfig s_conf= PublishToFileConfig.getConfig(); private static PublishToFileConfig s_conf= PublishToFileConfig.getConfig();
@ -70,18 +68,13 @@ public class Initializer extends CompoundInitializer {
final String url = RuntimeConfig.getConfig().getJDBCURL(); final String url = RuntimeConfig.getConfig().getJDBCURL();
final int database = DbHelper.getDatabaseFromURL(url); 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)}. // * An empty implementation of {@link Initializer#init(DataInitEvent)}.
* // *
* @param evt The data init event. // * @param evt The data init event.
*/ // */
// public void init(DataInitEvent evt) { // public void init(DataInitEvent evt) {
// } // }
@ -128,11 +121,11 @@ public class Initializer extends CompoundInitializer {
} }
/** // /**
* An empty implementation of {@link Initializer#init(LegacyInitEvent)}. // * An empty implementation of {@link Initializer#init(LegacyInitEvent)}.
* // *
* @param evt The legacy init event. // * @param evt The legacy init event.
*/ // */
// An empty implementations prevents this initializer from beiong executed. // An empty implementations prevents this initializer from beiong executed.
// A missing implementations causes the super class method to be executed, which // A missing implementations causes the super class method to be executed, which
// invokes the above added LegacyInitializer. // invokes the above added LegacyInitializer.

View File

@ -97,6 +97,9 @@ public class CMSTask extends UserTask {
private boolean m_authorOnly = false; private boolean m_authorOnly = false;
/**
* Constructor
*/
public CMSTask() { public CMSTask() {
this(BASE_DATA_OBJECT_TYPE); this(BASE_DATA_OBJECT_TYPE);
} }