Die SortKeys für die verschiedenen AssetSteps können nun über die Konfiguration des jeweiligen Moduls festgelegt werden (Ticket #1507).

git-svn-id: https://svn.libreccm.org/ccm/trunk@2178 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2013-06-06 11:57:05 +00:00
parent 98f4af8da3
commit b124d88518
35 changed files with 595 additions and 178 deletions

View File

@ -15,7 +15,6 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.cms.contentassets; package com.arsdigita.cms.contentassets;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
@ -32,7 +31,6 @@ public class DublinCoreConfig extends AbstractConfig {
/** A logger instance to assist debugging. */ /** A logger instance to assist debugging. */
private static final Logger s_log = Logger.getLogger(DublinCoreConfig.class); private static final Logger s_log = Logger.getLogger(DublinCoreConfig.class);
/** Singelton config object. */ /** Singelton config object. */
private static DublinCoreConfig s_conf; private static DublinCoreConfig s_conf;
@ -52,11 +50,9 @@ public class DublinCoreConfig extends AbstractConfig {
return s_conf; return s_conf;
} }
// /////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////
// //
// set of configuration parameters // set of configuration parameters
/** Default Audience Domain Key preset in the authoring step ui */ /** Default Audience Domain Key preset in the authoring step ui */
private Parameter m_audience = new StringParameter( private Parameter m_audience = new StringParameter(
"com.arsdigita.cms.contentassets.dublincore.audience_domain", "com.arsdigita.cms.contentassets.dublincore.audience_domain",
@ -102,6 +98,11 @@ public class DublinCoreConfig extends AbstractConfig {
"com.arsdigita.cms.contentassets.dublincore.related_items_subject_domain", "com.arsdigita.cms.contentassets.dublincore.related_items_subject_domain",
Parameter.OPTIONAL, Parameter.OPTIONAL,
null); null);
private Parameter m_assetStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contentassets.dublincore.asset_step_sortkey",
Parameter.Optional,
3);
/** /**
* Constructor just registers and loads the parameter. * Constructor just registers and loads the parameter.
@ -117,6 +118,7 @@ public class DublinCoreConfig extends AbstractConfig {
register(m_publisher); register(m_publisher);
register(m_use_ccn_portal); register(m_use_ccn_portal);
register(m_relatedItemsSubjectDomain); register(m_relatedItemsSubjectDomain);
register(m_assetStepSortKey);
loadInfo(); loadInfo();
} }
@ -126,43 +128,48 @@ public class DublinCoreConfig extends AbstractConfig {
* @return * @return
*/ */
public String getAudienceDomain() { public String getAudienceDomain() {
return (String)get(m_audience); return (String) get(m_audience);
} }
public String getCoverageSpatialDomain() { public String getCoverageSpatialDomain() {
return (String)get(m_coverageSpatial); return (String) get(m_coverageSpatial);
} }
public String getCoverageUnitDomain() { public String getCoverageUnitDomain() {
return (String)get(m_coverageUnit); return (String) get(m_coverageUnit);
} }
public String getOwnerDefault() { public String getOwnerDefault() {
return (String)get(m_owner); return (String) get(m_owner);
} }
public String getRightsDefault() { public String getRightsDefault() {
return (String)get(m_rights); return (String) get(m_rights);
} }
public String getPublisherDefault() { public String getPublisherDefault() {
return (String)get(m_publisher); return (String) get(m_publisher);
} }
public boolean getUseCCNPortalMetadata() { public boolean getUseCCNPortalMetadata() {
return ((Boolean)get(m_use_ccn_portal)).booleanValue(); return ((Boolean) get(m_use_ccn_portal)).booleanValue();
} }
public String getRelatedItemsSubjectDomain() { public String getRelatedItemsSubjectDomain() {
return (String)get(m_relatedItemsSubjectDomain); return (String) get(m_relatedItemsSubjectDomain);
} }
public String getOwnerContactDefault() { public String getOwnerContactDefault() {
return (String)get(m_owner_contact); return (String) get(m_owner_contact);
}
public Integer getAssetStepSortKey() {
return (Integer) get(m_assetStepSortKey);
} }
// Only for test suites // Only for test suites
void setRelatedItemsSubjectDomain(String domain) { void setRelatedItemsSubjectDomain(String domain) {
set(m_relatedItemsSubjectDomain, domain); set(m_relatedItemsSubjectDomain, domain);
} }
} }

View File

@ -42,3 +42,8 @@ com.arsdigita.cms.contentassets.dublincore.related_items_subject_domain.title=Re
com.arsdigita.cms.contentassets.dublincore.related_items_subject_domain.purpose=Related items subject domain com.arsdigita.cms.contentassets.dublincore.related_items_subject_domain.purpose=Related items subject domain
com.arsdigita.cms.contentassets.dublincore.related_items_subject_domain.example=LGCL com.arsdigita.cms.contentassets.dublincore.related_items_subject_domain.example=LGCL
com.arsdigita.cms.contentassets.dublincore.related_items_subject_domain.format=[string] com.arsdigita.cms.contentassets.dublincore.related_items_subject_domain.format=[string]
com.arsdigita.cms.contentassets.dublincore.asset_step_sortkey.title = Sort key for the Dublin Core asset step
com.arsdigita.cms.contentassets.dublincore.asset_step_sortkey.purpose = Sort key for the Dublin Core asset step
com.arsdigita.cms.contentassets.dublincore.asset_step_sortkey.example = 3
com.arsdigita.cms.contentassets.dublincore.asset_step_sortkey.format = [Integer]

View File

@ -87,6 +87,6 @@ public class DublinCoreInitializer extends ContentAssetInitializer {
* The sort key for the authoring step * The sort key for the authoring step
*/ */
public int getAuthoringStepSortKey() { public int getAuthoringStepSortKey() {
return 3; // XXX config param please return DublinCoreInstance.instanceOf().getAssetStepSortKey();
} }
} }

View File

@ -5,6 +5,7 @@ import com.arsdigita.bebop.FormSection;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.SpecificClassParameter; import com.arsdigita.util.parameter.SpecificClassParameter;
import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -13,14 +14,11 @@ public class FileAttachmentConfig extends AbstractConfig {
/** A logger instance to assist debugging. */ /** A logger instance to assist debugging. */
private static final Logger s_log = Logger.getLogger(FileAttachmentConfig.class); private static final Logger s_log = Logger.getLogger(FileAttachmentConfig.class);
/** Singelton config object. */ /** Singelton config object. */
private static FileAttachmentConfig s_conf; private static FileAttachmentConfig s_conf;
/** /**
* Gain a DublinCoreConfig object. * Singleton pattern, don't instantiate a config object using the
*
* Singelton pattern, don't instantiate a config object using the
* constructor directly! * constructor directly!
* @return * @return
*/ */
@ -33,38 +31,45 @@ public class FileAttachmentConfig extends AbstractConfig {
return s_conf; return s_conf;
} }
// /////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////
// //
// set of configuration parameters // set of configuration parameters
/** /**
* A form which should be used for editing file asset properties. * A form which should be used for editing file asset properties.
* Default implementation edits Assets.description property. * Default implementation edits Assets.description property.
*/ */
Parameter editFormClass = new SpecificClassParameter( private final Parameter editFormClass =
"com.arsdigita.cms.contentassets.file_edit_form", new SpecificClassParameter(
Parameter.REQUIRED, "com.arsdigita.cms.contentassets.file_edit_form",
FileDescriptionForm.class, Parameter.REQUIRED,
FormSection.class FileDescriptionForm.class,
); FormSection.class);
/** /**
* Optional parameter if set to TRUE will disply the asset URL instead of * Optional parameter if set to TRUE will disply the asset URL instead of
* the description on AttachFile Authroing step. Default: FALSE * the description on AttachFile Authroing step. Default: FALSE
*/ */
Parameter showAssetID = new BooleanParameter( private final Parameter showAssetID =
"com.arsdigita.cms.contentassets.file_show_asset_id", new BooleanParameter(
Parameter.OPTIONAL, "com.arsdigita.cms.contentassets.file_show_asset_id",
Boolean.FALSE Parameter.OPTIONAL,
); Boolean.FALSE);
private final Parameter fileAttachmentStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contentassets.file_attchment_step_sort_key",
Parameter.REQUIRED,
2);
/** /**
* Constructor, don't use it directly! * Constructor, don't use it directly!
*/ */
public FileAttachmentConfig() { protected FileAttachmentConfig() {
super();
register(editFormClass); register(editFormClass);
register(showAssetID); register(showAssetID);
register(fileAttachmentStepSortKey);
loadInfo(); loadInfo();
} }
@ -72,8 +77,12 @@ public class FileAttachmentConfig extends AbstractConfig {
return (Class) get(editFormClass); return (Class) get(editFormClass);
} }
public boolean isShowAssetIDEnabled(){ public boolean isShowAssetIDEnabled() {
return get(showAssetID).equals(Boolean.TRUE); return get(showAssetID).equals(Boolean.TRUE);
}
public Integer getFileAttachmentStepSortKey() {
return (Integer) get(fileAttachmentStepSortKey);
} }
} }

View File

@ -7,3 +7,8 @@ com.arsdigita.cms.contentassets.file_show_asset_id.title=show File asset URL
com.arsdigita.cms.contentassets.file_show_asset_id.purpose=Optional parameter if set to TRUE will disply the asset URL instead of the description on AttachFile Authroing step com.arsdigita.cms.contentassets.file_show_asset_id.purpose=Optional parameter if set to TRUE will disply the asset URL instead of the description on AttachFile Authroing step
com.arsdigita.cms.contentassets.file_show_asset_id.example=TRUE com.arsdigita.cms.contentassets.file_show_asset_id.example=TRUE
com.arsdigita.cms.contentassets.file_show_asset_id.format=[boolean] com.arsdigita.cms.contentassets.file_show_asset_id.format=[boolean]
com.arsdigita.cms.contentassets.file_attchment_step_sort_key.title = Sort key for the file attachment step
com.arsdigita.cms.contentassets.file_attchment_step_sort_key.purpose = Sort key for the file attachment step
com.arsdigita.cms.contentassets.file_attchment_step_sort_key.example = 2
com.arsdigita.cms.contentassets.file_attchment_step_sort_key.format = [Integer]

View File

@ -140,7 +140,7 @@ public class FileAttachmentInitializer extends ContentAssetInitializer {
* The sort key for the authoring step * The sort key for the authoring step
*/ */
public int getAuthoringStepSortKey() { public int getAuthoringStepSortKey() {
return 2; // XXX config param please return FileAttachmentConfig.instanceOf().getFileAttachmentStepSortKey();
} }
} }

View File

@ -20,11 +20,11 @@ package com.arsdigita.cms.contentassets;
import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
/** /**
* A record containing server-session scoped configuration properties. * A record containing server-session scoped configuration properties.
* *
@ -40,7 +40,6 @@ public final class ItemImageAttachmentConfig extends AbstractConfig {
/** A logger instance to assist debugging. */ /** A logger instance to assist debugging. */
private static final Logger s_log = Logger.getLogger(ItemImageAttachmentConfig.class); private static final Logger s_log = Logger.getLogger(ItemImageAttachmentConfig.class);
/** Singelton config object. */ /** Singelton config object. */
private static ItemImageAttachmentConfig s_conf; private static ItemImageAttachmentConfig s_conf;
@ -60,15 +59,14 @@ public final class ItemImageAttachmentConfig extends AbstractConfig {
return s_conf; return s_conf;
} }
// /////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////
// //
// set of configuration parameters // set of configuration parameters
// Are the description and title properties available for
// Are the description and title properties available for // display/editing. These properties are used by the
// display/editing. These properties are used by the // ImageGallery content type.
// ImageGallery content type.
private final Parameter m_isImageStepDescriptionAndTitleShown; private final Parameter m_isImageStepDescriptionAndTitleShown;
private final Parameter m_imageStepSortKey;
/** /**
* Do not instantiate this class directly. * Do not instantiate this class directly.
@ -77,12 +75,19 @@ public final class ItemImageAttachmentConfig extends AbstractConfig {
**/ **/
public ItemImageAttachmentConfig() { public ItemImageAttachmentConfig() {
m_isImageStepDescriptionAndTitleShown = new BooleanParameter m_isImageStepDescriptionAndTitleShown =
("com.arsdigita.cms.m_is_image_step_description_and_title_shown", new BooleanParameter(
Parameter.REQUIRED, new Boolean(false)); "com.arsdigita.cms.m_is_image_step_description_and_title_shown",
Parameter.REQUIRED,
Boolean.FALSE);
m_imageStepSortKey = new IntegerParameter(
"com.arsdigita.cms.image_step_sortkey",
Parameter.REQUIRED,
1);
register(m_isImageStepDescriptionAndTitleShown); register(m_isImageStepDescriptionAndTitleShown);
register(m_imageStepSortKey);
loadInfo(); loadInfo();
} }
@ -90,4 +95,9 @@ public final class ItemImageAttachmentConfig extends AbstractConfig {
public final boolean getIsImageStepDescriptionAndTitleShown() { public final boolean getIsImageStepDescriptionAndTitleShown() {
return ((Boolean) get(m_isImageStepDescriptionAndTitleShown)).booleanValue(); return ((Boolean) get(m_isImageStepDescriptionAndTitleShown)).booleanValue();
} }
public final Integer getImageStepSortKey() {
return (Integer) get(m_imageStepSortKey);
}
} }

View File

@ -2,3 +2,8 @@ com.arsdigita.cms.m_is_image_step_description_and_title_shown.title=Are attached
com.arsdigita.cms.m_is_image_step_description_and_title_shown.purpose=Should the description and title properties be available for attached images com.arsdigita.cms.m_is_image_step_description_and_title_shown.purpose=Should the description and title properties be available for attached images
com.arsdigita.cms.m_is_image_step_description_and_title_shown.example=false com.arsdigita.cms.m_is_image_step_description_and_title_shown.example=false
com.arsdigita.cms.m_is_image_step_description_and_title_shown.format=[boolean] com.arsdigita.cms.m_is_image_step_description_and_title_shown.format=[boolean]
com.arsdigita.cms.image_step_sortkey.title = Sort key for the image step
com.arsdigita.cms.image_step_sortkey.purpose = Sort key for the image step
com.arsdigita.cms.image_step_sortkey.example = 1
com.arsdigita.cms.image_step_sortkey.format = [Integer]

View File

@ -15,7 +15,6 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
package com.arsdigita.cms.contentassets; package com.arsdigita.cms.contentassets;
import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentPage;
@ -47,27 +46,26 @@ public class ItemImageAttachmentInitializer extends ContentAssetInitializer {
* @param ev * @param ev
*/ */
@Override @Override
public void init( DomainInitEvent ev ) { public void init(DomainInitEvent ev) {
super.init(ev); super.init(ev);
DomainObjectFactory.registerInstantiator( DomainObjectFactory.registerInstantiator(
ItemImageAttachment.BASE_DATA_OBJECT_TYPE, ItemImageAttachment.BASE_DATA_OBJECT_TYPE,
new DomainObjectInstantiator() { new DomainObjectInstantiator() {
protected DomainObject doNewInstance( DataObject obj ) { protected DomainObject doNewInstance(DataObject obj) {
return new ItemImageAttachment( obj ); return new ItemImageAttachment(obj);
}
@Override
public DomainObjectInstantiator resolveInstantiator( DataObject obj ) {
return this;
}
} }
);
@Override
public DomainObjectInstantiator resolveInstantiator(DataObject obj) {
return this;
}
});
} }
/** /**
* The base type against which the asset is defined, * The base type against which the asset is defined,
* typically com.arsdigita.cms.ContentPage * typically com.arsdigita.cms.ContentPage
@ -81,8 +79,7 @@ public class ItemImageAttachmentInitializer extends ContentAssetInitializer {
* /WEB-INF/traversal-adapters/com/arsdigita/cms/contentassets/FileAttachments.xml * /WEB-INF/traversal-adapters/com/arsdigita/cms/contentassets/FileAttachments.xml
*/ */
public String getTraversalXML() { public String getTraversalXML() {
return "/WEB-INF/traversal-adapters/com/arsdigita/" + return "/WEB-INF/traversal-adapters/com/arsdigita/" + "cms/contentassets/ItemImageAttachment.xml";
"cms/contentassets/ItemImageAttachment.xml";
} }
/** /**
@ -120,6 +117,7 @@ public class ItemImageAttachmentInitializer extends ContentAssetInitializer {
* The sort key for the authoring step * The sort key for the authoring step
*/ */
public int getAuthoringStepSortKey() { public int getAuthoringStepSortKey() {
return 1; // XXX config param please return ItemImageAttachmentConfig.instanceOf().getImageStepSortKey();
} }
} }

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<registry> <registry>
<!-- nothing yet --> <config class="com.arsdigita.cms.contentassets.NotesConfig"
storage="ccm-cms-assets/notes.properties"/>
</registry> </registry>

View File

@ -0,0 +1,43 @@
package com.arsdigita.cms.contentassets;
import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
* @version $Id$
*/
public class NotesConfig extends AbstractConfig {
private static final NotesConfig INSTANCE = new NotesConfig();
static {
INSTANCE.load();
}
private final Parameter assetStepSortKey = new IntegerParameter(
"com.arsdigita.cms.contentassets.notes.asset_step_sortkey",
Parameter.REQUIRED,
3);
protected NotesConfig() {
super();
register(assetStepSortKey);
loadInfo();
}
public static final NotesConfig getInstance() {
return INSTANCE;
}
public Integer getAssetStepSortKey() {
return (Integer) get(assetStepSortKey);
}
}

View File

@ -0,0 +1,4 @@
com.arsdigita.cms.contentassets.notes.asset_step_sortkey.title = Sort key for the notes asset step
com.arsdigita.cms.contentassets.notes.asset_step_sortkey.purpose = Sort key for the notes asset step
com.arsdigita.cms.contentassets.notes.asset_step_sortkey.example = 3
com.arsdigita.cms.contentassets.notes.asset_step_sortkey.format = [Integer]

View File

@ -118,6 +118,6 @@ public class NotesInitializer extends ContentAssetInitializer {
* The sort key for the authoring step * The sort key for the authoring step
*/ */
public int getAuthoringStepSortKey() { public int getAuthoringStepSortKey() {
return 3; return NotesConfig.getInstance().getAssetStepSortKey();
} }
} }

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<registry> <registry>
<!-- nothing yet --> <config class="com.arsdigita.cms.contentassets.RelatedLinkConfig"
storage="ccm-cms-assets/relatedlink.properties"/>
</registry> </registry>

View File

@ -0,0 +1,42 @@
package com.arsdigita.cms.contentassets;
import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.IntegerParameter;
import com.arsdigita.util.parameter.Parameter;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
* @version $Id$
*/
public class RelatedLinkConfig extends AbstractConfig {
private static final RelatedLinkConfig INSTANCE = new RelatedLinkConfig();
static {
INSTANCE.load();
}
private final Parameter assetStepSortKey = new IntegerParameter(
"com.arsdigita.cms.relatedlink.contentassets.asset_step_sortkey",
Parameter.REQUIRED,
1);
protected RelatedLinkConfig() {
super();
register(assetStepSortKey);
loadInfo();
}
public static final RelatedLinkConfig getInstance() {
return INSTANCE;
}
public Integer getAssetStepSortKey() {
return (Integer) get(assetStepSortKey);
}
}

View File

@ -0,0 +1,4 @@
com.arsdigita.cms.relatedlink.contentassets.asset_step.title = Sort key for the related link asset step
com.arsdigita.cms.relatedlink.contentassets.asset_step.purpose = Sort key for the related link asset step
com.arsdigita.cms.relatedlink.contentassets.asset_step.example = 1
com.arsdigita.cms.relatedlink.contentassets.asset_step.format = [Integer]

View File

@ -95,6 +95,6 @@ public class RelatedLinkInitializer extends ContentAssetInitializer {
* The sort key for the authoring step * The sort key for the authoring step
*/ */
public int getAuthoringStepSortKey() { public int getAuthoringStepSortKey() {
return 1; // XXX config param please return RelatedLinkConfig.getInstance().getAssetStepSortKey();
} }
} }

View File

@ -630,6 +630,12 @@ public final class CMSConfig extends AbstractConfig {
"com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step", "com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
private final Parameter m_personOrgaUnitsStepSortKey = new BooleanParameter(
"com.arsdigita.cms.contenttypes.genericperson.person_orgaunits_step_sortkey",
Parameter.REQUIRED,
20);
/** /**
* Enable or disable the XML cache in {@link SimpleXMLGenerator} * Enable or disable the XML cache in {@link SimpleXMLGenerator}
*/ */
@ -761,6 +767,7 @@ public final class CMSConfig extends AbstractConfig {
register(m_itemSearchFlatBrowsePanePageSize); register(m_itemSearchFlatBrowsePanePageSize);
register(m_attachPersonOrgaUnitsStep); register(m_attachPersonOrgaUnitsStep);
register(m_personOrgaUnitsStepSortKey);
register(m_enableXmlCache); register(m_enableXmlCache);
register(m_xmlCacheSize); register(m_xmlCacheSize);
@ -1242,6 +1249,10 @@ public final class CMSConfig extends AbstractConfig {
return (Boolean) get(m_attachPersonOrgaUnitsStep); return (Boolean) get(m_attachPersonOrgaUnitsStep);
} }
public Integer getPersonOrgaUnitsStepSortKey() {
return (Integer) get(m_personOrgaUnitsStepSortKey);
}
public Boolean getEnableXmlCache() { public Boolean getEnableXmlCache() {
return (Boolean) get(m_enableXmlCache); return (Boolean) get(m_enableXmlCache);
} }

View File

@ -318,7 +318,12 @@ com.arsdigita.cms.image_cache.max_age.format=[integer]
com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step.title = Attach PersonOrgaUnits step com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step.title = Attach PersonOrgaUnits step
com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step.purpose = Attaches an authoring step to GenericPerson which displays all GenericOrganizationalUnits to which the person is assigned to com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step.purpose = Attaches an authoring step to GenericPerson which displays all GenericOrganizationalUnits to which the person is assigned to
com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step.example = true com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step.example = true
com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step.foramt = [boolean] com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step.format = [boolean]
com.arsdigita.cms.contenttypes.genericperson.person_orgaunits_step_sortkey.title = Sets the sort key for the Attach Person OrgaUnits step
com.arsdigita.cms.contenttypes.genericperson.person_orgaunits_step_sortkey.purpose = Sets the sort key for the Attach Person OrgaUnits step
com.arsdigita.cms.contenttypes.genericperson.person_orgaunits_step_sortkey.example = 20
com.arsdigita.cms.contenttypes.genericperson.person_orgaunits_step_sortkey.format = [Integer]
com.arsdigita.cms.xml.cache.enable.title=Enable a XML cache for the SimpleXMLGenerator com.arsdigita.cms.xml.cache.enable.title=Enable a XML cache for the SimpleXMLGenerator
com.arsdigita.cms.xml.cache.enable.purpose=Enable a XML cache for the SimpleXMLGenerator com.arsdigita.cms.xml.cache.enable.purpose=Enable a XML cache for the SimpleXMLGenerator

View File

@ -238,7 +238,7 @@ public class Initializer extends CompoundInitializer {
GenericPersonOrgaUnitsStep.class, GenericPersonOrgaUnitsStep.class,
ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"), ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"),
ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"), ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"),
20); s_conf.getPersonOrgaUnitsStepSortKey());
} }
s_log.debug("CMS.Initializer.init(DomainInitEvent) completed"); s_log.debug("CMS.Initializer.init(DomainInitEvent) completed");

View File

@ -49,7 +49,6 @@ import com.arsdigita.web.RedirectSignal;
import com.arsdigita.xml.Element; import com.arsdigita.xml.Element;
import com.arsdigita.xml.XML; import com.arsdigita.xml.XML;
/** /**
* abstract class for displaying the categories assigned to an object under one or * abstract class for displaying the categories assigned to an object under one or
* more root nodes. Subclasses should retrieve the object to be assigned and * more root nodes. Subclasses should retrieve the object to be assigned and
@ -62,11 +61,9 @@ import com.arsdigita.xml.XML;
public abstract class ACSObjectCategorySummary extends SimpleComponent { public abstract class ACSObjectCategorySummary extends SimpleComponent {
private static final Logger s_log = Logger.getLogger(ACSObjectCategorySummary.class); private static final Logger s_log = Logger.getLogger(ACSObjectCategorySummary.class);
public static final String ACTION_DELETE = "delete"; public static final String ACTION_DELETE = "delete";
public static final String ACTION_ADD = "add"; public static final String ACTION_ADD = "add";
public static final String ACTION_ADD_JS = "addJS"; public static final String ACTION_ADD_JS = "addJS";
private Map m_listeners = new HashMap(); private Map m_listeners = new HashMap();
public ACSObjectCategorySummary() { public ACSObjectCategorySummary() {
@ -75,7 +72,7 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
} }
public void registerAction(String name, public void registerAction(String name,
ActionListener listener) { ActionListener listener) {
m_listeners.put(name, listener); m_listeners.put(name, listener);
} }
@ -85,7 +82,7 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
Assert.isTrue(canEdit(state), "User can edit object"); Assert.isTrue(canEdit(state), "User can edit object");
String name = state.getControlEventName(); String name = state.getControlEventName();
ActionListener listener = (ActionListener)m_listeners.get(name); ActionListener listener = (ActionListener) m_listeners.get(name);
if (s_log.isDebugEnabled()) { if (s_log.isDebugEnabled()) {
s_log.debug("Got event " + name + " listener " + listener); s_log.debug("Got event " + name + " listener " + listener);
@ -96,36 +93,32 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
} }
} }
/** /**
* default behaviour is to check for edit access on the current resource. * default behaviour is to check for edit access on the current resource.
* as defined by getCategorizedObject. * as defined by getCategorizedObject.
* This can be overridden by subclasses, if for instance a specific * This can be overridden by subclasses, if for instance a specific
* privilege should be checked * privilege should be checked
* @param state * @param state
* @return * @return
*/ */
protected boolean canEdit(PageState state) { protected boolean canEdit(PageState state) {
Party party = Kernel.getContext().getParty(); Party party = Kernel.getContext().getParty();
if (party == null) { if (party == null) {
party = Kernel.getPublicUser(); party = Kernel.getPublicUser();
} }
PermissionDescriptor edit = new PermissionDescriptor(PrivilegeDescriptor.EDIT, getObject(state), party); PermissionDescriptor edit = new PermissionDescriptor(PrivilegeDescriptor.EDIT, getObject(state), party);
return PermissionService.checkPermission(edit); return PermissionService.checkPermission(edit);
} }
protected abstract ACSObject getObject(PageState state);
protected abstract String getXMLPrefix();
protected abstract String getXMLNameSpace();
protected abstract ACSObject getObject(PageState state); protected abstract RootCategoryCollection getRootCategories(PageState state);
protected abstract String getXMLPrefix();
protected abstract String getXMLNameSpace();
protected abstract RootCategoryCollection getRootCategories(PageState state);
public void generateXML(PageState state, public void generateXML(PageState state,
Element parent) { Element parent) {
@ -137,12 +130,12 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
exportAttributes(content); exportAttributes(content);
Element rootCats = content.newChildElement(getXMLPrefix() + ":categoryRoots", Element rootCats = content.newChildElement(getXMLPrefix() + ":categoryRoots",
getXMLNameSpace()); getXMLNameSpace());
RootCategoryCollection roots = getRootCategories(state); RootCategoryCollection roots = getRootCategories(state);
while (roots.next()) { while (roots.next()) {
Element root = rootCats.newChildElement(getXMLPrefix() + ":categoryRoot", Element root = rootCats.newChildElement(getXMLPrefix() + ":categoryRoot",
getXMLNameSpace()); getXMLNameSpace());
root.addAttribute("name", roots.getName()); root.addAttribute("name", roots.getName());
root.addAttribute("description", roots.getDescription()); root.addAttribute("description", roots.getDescription());
@ -171,10 +164,10 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
} }
Element itemCats = content.newChildElement(getXMLPrefix() + ":itemCategories", Element itemCats = content.newChildElement(getXMLPrefix() + ":itemCategories",
getXMLNameSpace()); getXMLNameSpace());
CategoryCollection cats = new CategorizedObject(getObject(state)).getParents(); CategoryCollection cats = new CategorizedObject(getObject(state)).getParents();
while (cats.next()) { while (cats.next()) {
Category cat = (Category)cats.getCategory(); Category cat = (Category) cats.getCategory();
// This is lame, but there is no way to get full path // This is lame, but there is no way to get full path
@ -184,7 +177,7 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
parents.addOrder(Category.DEFAULT_ANCESTORS); parents.addOrder(Category.DEFAULT_ANCESTORS);
while (parents.next()) { while (parents.next()) {
Category par = (Category)parents.getCategory(); Category par = (Category) parents.getCategory();
if (path.length() != 0) { if (path.length() != 0) {
path.append(" -> "); path.append(" -> ");
} }
@ -192,7 +185,7 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
} }
Element el = itemCats.newChildElement(getXMLPrefix() + ":itemCategory", Element el = itemCats.newChildElement(getXMLPrefix() + ":itemCategory",
getXMLNameSpace()); getXMLNameSpace());
el.addAttribute("name", cat.getName()); el.addAttribute("name", cat.getName());
el.addAttribute("description", cat.getDescription()); el.addAttribute("description", cat.getDescription());
el.addAttribute("path", XML.format(path)); el.addAttribute("path", XML.format(path));
@ -212,23 +205,24 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
} }
private class DeleteActionListener implements ActionListener { private class DeleteActionListener implements ActionListener {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
PageState state = e.getPageState(); PageState state = e.getPageState();
String value = state.getControlEventValue(); String value = state.getControlEventValue();
Category cat = (Category)DomainObjectFactory Category cat = (Category) DomainObjectFactory
.newInstance(new OID(Category.BASE_DATA_OBJECT_TYPE, .newInstance(new OID(Category.BASE_DATA_OBJECT_TYPE,
new BigDecimal(value))); new BigDecimal(value)));
ACSObject object = getObject(state); ACSObject object = getObject(state);
if (s_log.isDebugEnabled()) { if (s_log.isDebugEnabled()) {
s_log.debug("Removing category " + cat + " from " + object s_log.debug("Removing category " + cat + " from " + object);
);
} }
cat.removeChild(object); cat.removeChild(object);
state.clearControlEvent(); state.clearControlEvent();
throw new RedirectSignal(state.toURL(), true); throw new RedirectSignal(state.toURL(), true);
} }
} }
} }

View File

@ -9,7 +9,7 @@
name="scientificcms" name="scientificcms"
prettyName="Scientific CMS" prettyName="Scientific CMS"
version="2.1.0" version="2.1.0"
release="SNAPSHOT-r2164" release="SNAPSHOT-r2170"
webxml="web-sci.xml" webxml="web-sci.xml"
webapp="ROOT" webapp="ROOT"
xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd"> xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd">

View File

@ -69,7 +69,7 @@ public class PublicationInitializer extends ContentTypeInitializer {
PublicationGenericOrganizationalUnitsStep.class, PublicationGenericOrganizationalUnitsStep.class,
PublicationGlobalizationUtil.globalize("publications.ui.orgaunits.title"), PublicationGlobalizationUtil.globalize("publications.ui.orgaunits.title"),
PublicationGlobalizationUtil.globalize("publications.ui.orgaunits.description"), PublicationGlobalizationUtil.globalize("publications.ui.orgaunits.description"),
10); config.getOrgaUnitsStepSortKey());
} }
final String attachToStr = config.getAttachPublicationsStepTo(); final String attachToStr = config.getAttachPublicationsStepTo();
@ -91,7 +91,7 @@ public class PublicationInitializer extends ContentTypeInitializer {
"genericorganizationalunit.ui.publications.title"), "genericorganizationalunit.ui.publications.title"),
PublicationGlobalizationUtil.globalize( PublicationGlobalizationUtil.globalize(
"genericorganizationalunit.ui.publications.description"), "genericorganizationalunit.ui.publications.description"),
10); config.getPublicationsStepSortKey());
} }
if (config.getAttachPersonPublicationsStep()) { if (config.getAttachPersonPublicationsStep()) {
@ -100,7 +100,7 @@ public class PublicationInitializer extends ContentTypeInitializer {
PersonPublicationsStep.class, PersonPublicationsStep.class,
PublicationGlobalizationUtil.globalize("person.ui.publications.title"), PublicationGlobalizationUtil.globalize("person.ui.publications.title"),
PublicationGlobalizationUtil.globalize("person.ui.publications.description"), PublicationGlobalizationUtil.globalize("person.ui.publications.description"),
10); config.getPersonPublicationsStepSortKey());
} }
final String attachOrgaPubStepTo = config.getAttachOrganizationPublicationsStepTo(); final String attachOrgaPubStepTo = config.getAttachOrganizationPublicationsStepTo();
@ -120,7 +120,7 @@ public class PublicationInitializer extends ContentTypeInitializer {
OrganizationPublicationsStep.class, OrganizationPublicationsStep.class,
PublicationGlobalizationUtil.globalize("organization.ui.publications.title"), PublicationGlobalizationUtil.globalize("organization.ui.publications.title"),
PublicationGlobalizationUtil.globalize("organization.ui.publications.description"), PublicationGlobalizationUtil.globalize("organization.ui.publications.description"),
11); config.getOrganizationPublicationsStepSortKey());
} }
} }

View File

@ -14,10 +14,15 @@ import com.arsdigita.util.parameter.StringParameter;
public class PublicationsConfig extends AbstractConfig { public class PublicationsConfig extends AbstractConfig {
private final Parameter attachOrgaUnitsStep; private final Parameter attachOrgaUnitsStep;
private final Parameter orgaUnitsStepSortKey;
private final Parameter attachOrganizationPublicationsStepTo; private final Parameter attachOrganizationPublicationsStepTo;
private final Parameter organizationPublicationsStepSortKey;
private final Parameter attachPersonPublicationsStep; private final Parameter attachPersonPublicationsStep;
private final Parameter personPublicationsStepSortKey;
private final Parameter attachPublicationsStepTo; private final Parameter attachPublicationsStepTo;
private final Parameter publicationsStepSortKey;
private final Parameter attachPublisherPublicationsStep; private final Parameter attachPublisherPublicationsStep;
private final Parameter publisherPublicationsStepSortKey;
private final Parameter defaultAuthorsFolder; private final Parameter defaultAuthorsFolder;
private final Parameter defaultSeriesFolder; private final Parameter defaultSeriesFolder;
private final Parameter defaultPublisherFolder; private final Parameter defaultPublisherFolder;
@ -41,30 +46,60 @@ public class PublicationsConfig extends AbstractConfig {
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.FALSE); Boolean.FALSE);
orgaUnitsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.publications.orgaunits_step_sort_key",
Parameter.REQUIRED,
10);
attachOrganizationPublicationsStepTo = attachOrganizationPublicationsStepTo =
new StringParameter( new StringParameter(
"com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to", "com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to",
Parameter.REQUIRED, Parameter.REQUIRED,
""); "");
organizationPublicationsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.publications.organization_publications_step_sort_key",
Parameter.REQUIRED,
10);
attachPersonPublicationsStep = attachPersonPublicationsStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.publications.attach_person_publications_step", "com.arsdigita.cms.contenttypes.publications.attach_person_publications_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
personPublicationsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.publications.person_publications_step_sort_key",
Parameter.REQUIRED,
10);
attachPublicationsStepTo = attachPublicationsStepTo =
new StringParameter( new StringParameter(
"com.arsdigita.cms.contenttypes.publications.attach_publications_step_to", "com.arsdigita.cms.contenttypes.publications.attach_publications_step_to",
Parameter.REQUIRED, Parameter.REQUIRED,
""); "");
publicationsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.publications.publications_step_sort_key",
Parameter.REQUIRED,
11);
attachPublisherPublicationsStep = attachPublisherPublicationsStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step", "com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
publisherPublicationsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.publications.publisher_publications_step_sort_key",
Parameter.REQUIRED,
10);
defaultAuthorsFolder = new IntegerParameter( defaultAuthorsFolder = new IntegerParameter(
"com.arsdigita.cms.contenttypes.publications.default_authors_folder", "com.arsdigita.cms.contenttypes.publications.default_authors_folder",
Parameter.OPTIONAL, Parameter.OPTIONAL,
@ -131,19 +166,24 @@ public class PublicationsConfig extends AbstractConfig {
enableFirstPublishedProperty = new BooleanParameter( enableFirstPublishedProperty = new BooleanParameter(
"com.arsdigita.cms.contenttypes.publications.enable_first_published_property", "com.arsdigita.cms.contenttypes.publications.enable_first_published_property",
Parameter.REQUIRED, Parameter.REQUIRED,
true); true);
enableLanguageProperty = new BooleanParameter( enableLanguageProperty = new BooleanParameter(
"com.arsdigita.cms.contenttypes.publications.enable_language_property", "com.arsdigita.cms.contenttypes.publications.enable_language_property",
Parameter.REQUIRED, Parameter.REQUIRED,
true); true);
register(attachOrgaUnitsStep); register(attachOrgaUnitsStep);
register(orgaUnitsStepSortKey);
register(attachOrganizationPublicationsStepTo); register(attachOrganizationPublicationsStepTo);
register(organizationPublicationsStepSortKey);
register(attachPersonPublicationsStep); register(attachPersonPublicationsStep);
register(personPublicationsStepSortKey);
register(attachPublicationsStepTo); register(attachPublicationsStepTo);
register(publicationsStepSortKey);
register(attachPublisherPublicationsStep); register(attachPublisherPublicationsStep);
register(publisherPublicationsStepSortKey);
register(defaultAuthorsFolder); register(defaultAuthorsFolder);
register(defaultSeriesFolder); register(defaultSeriesFolder);
register(defaultPublisherFolder); register(defaultPublisherFolder);
@ -167,22 +207,42 @@ public class PublicationsConfig extends AbstractConfig {
return (Boolean) get(attachOrgaUnitsStep); return (Boolean) get(attachOrgaUnitsStep);
} }
public Integer getOrgaUnitsStepSortKey() {
return (Integer) get(orgaUnitsStepSortKey);
}
public String getAttachOrganizationPublicationsStepTo() { public String getAttachOrganizationPublicationsStepTo() {
return (String) get(attachOrganizationPublicationsStepTo); return (String) get(attachOrganizationPublicationsStepTo);
} }
public Integer getOrganizationPublicationsStepSortKey() {
return (Integer) get(organizationPublicationsStepSortKey);
}
public Boolean getAttachPersonPublicationsStep() { public Boolean getAttachPersonPublicationsStep() {
return (Boolean) get(attachPersonPublicationsStep); return (Boolean) get(attachPersonPublicationsStep);
} }
public Integer getPersonPublicationsStepSortKey() {
return (Integer) get(personPublicationsStepSortKey);
}
public String getAttachPublicationsStepTo() { public String getAttachPublicationsStepTo() {
return (String) get(attachPublicationsStepTo); return (String) get(attachPublicationsStepTo);
} }
public Integer getPublicationsStepSortKey() {
return (Integer) get(publicationsStepSortKey);
}
public Boolean getPublisherPublicationsStep() { public Boolean getPublisherPublicationsStep() {
return (Boolean) get(attachPublisherPublicationsStep); return (Boolean) get(attachPublisherPublicationsStep);
} }
public Integer getPublisherPublicationsStepSortKey() {
return (Integer) get(publisherPublicationsStepSortKey);
}
public Integer getDefaultAuthorsFolder() { public Integer getDefaultAuthorsFolder() {
if (get(defaultAuthorsFolder) == null) { if (get(defaultAuthorsFolder) == null) {
return null; return null;

View File

@ -3,30 +3,55 @@ com.arsdigita.cms.contenttypes.publications.attach_orgaunits_step.purpose = Enab
com.arsdigita.cms.contenttypes.publications.attach_orgaunits_step.example = true com.arsdigita.cms.contenttypes.publications.attach_orgaunits_step.example = true
com.arsdigita.cms.contenttypes.publications.attach_orgaunits_step.format = [Boolean] com.arsdigita.cms.contenttypes.publications.attach_orgaunits_step.format = [Boolean]
com.arsdigita.cms.contenttypes.publications.orgaunits_step_sort_key.title = Sort key for the publication -> GenericOrganizationalUnit authoring step
com.arsdigita.cms.contenttypes.publications.orgaunits_step_sort_key.purpose = Sort key for the publication -> GenericOrganizationalUnit authoring step
com.arsdigita.cms.contenttypes.publications.orgaunits_step_sort_key.example = 10
com.arsdigita.cms.contenttypes.publications.orgaunits_step_sort_key = [Integer]
com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to.title = Enable OrganizationPublications step com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to.title = Enable OrganizationPublications step
com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to.purpose = Attaches an authoring step to GenericOrganizationalUnit which displays all publications of the type UnPublished to which the organizational unit is assigned as publishing organization. com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to.purpose = Attaches an authoring step to GenericOrganizationalUnit which displays all publications of the type UnPublished to which the organizational unit is assigned as publishing organization.
com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to.example = com.arsdigita.cms.contenttypes.SimpleOrganization;com.arsdigita.cms.contenttypes.SciInstitute com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to.example = com.arsdigita.cms.contenttypes.SimpleOrganization;com.arsdigita.cms.contenttypes.SciInstitute
com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to.format = [String] com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to.format = [String]
com.arsdigita.cms.contenttypes.publications.attach_person_publications_step.title = Enable authoring which lists all publications of a person com.arsdigita.cms.contenttypes.publications.organization_publications_step_sort_key.title = Sort key for the OrganizationPublications step
com.arsdigita.cms.contenttypes.publications.organization_publications_step_sort_key.purpose = Sort key for the OrganizationPublications step
com.arsdigita.cms.contenttypes.publications.organization_publications_step_sort_key.example = 10
com.arsdigita.cms.contenttypes.publications.organization_publications_step_sort_key = [Integer]
com.arsdigita.cms.contenttypes.publications.attach_person_publications_step.title = Enable authoring step which lists all publications of a person
com.arsdigita.cms.contenttypes.publications.attach_person_publications_step.purpose = Attaches an authoring step to GenericPerson which displays all publications to which the person is assigned as author. com.arsdigita.cms.contenttypes.publications.attach_person_publications_step.purpose = Attaches an authoring step to GenericPerson which displays all publications to which the person is assigned as author.
com.arsdigita.cms.contenttypes.publications.attach_person_publications_step.example = true com.arsdigita.cms.contenttypes.publications.attach_person_publications_step.example = true
com.arsdigita.cms.contenttypes.publications.attach_person_publications_step.format = [Boolean] com.arsdigita.cms.contenttypes.publications.attach_person_publications_step.format = [Boolean]
com.arsdigita.cms.contenttypes.publications.person_publications_step_sort_key.title = Sort key for the PersonPublications step
com.arsdigita.cms.contenttypes.publications.person_publications_step_sort_key.purpose = Sort key for the PersonPublications step
com.arsdigita.cms.contenttypes.publications.person_publications_step_sort_key.example = 10
com.arsdigita.cms.contenttypes.publications.person_publications_step_sort_key = [Integer]
com.arsdigita.cms.contenttypes.publications.attach_publications_step_to.title = Attach the Publications authoring step com.arsdigita.cms.contenttypes.publications.attach_publications_step_to.title = Attach the Publications authoring step
com.arsdigita.cms.contenttypes.publications.attach_publications_step_to.purpose = Attaches the authoring step for associating a publication to organizationalunit to the authoring steps of the content types in the string. com.arsdigita.cms.contenttypes.publications.attach_publications_step_to.purpose = Attaches the authoring step for associating a publication to organizationalunit to the authoring steps of the content types in the string.
com.arsdigita.cms.contenttypes.publications.attach_publications_step_to.example = com.arsdigita.cms.contenttypes.SciInstitute;com.arsdigita.cms.contenttypes.SciDepartment;com.arsdigita.cms.contenttypes.SciProject com.arsdigita.cms.contenttypes.publications.attach_publications_step_to.example = com.arsdigita.cms.contenttypes.SciInstitute;com.arsdigita.cms.contenttypes.SciDepartment;com.arsdigita.cms.contenttypes.SciProject
com.arsdigita.cms.contenttypes.publications.attach_publications_step_to.format = [String] com.arsdigita.cms.contenttypes.publications.attach_publications_step_to.format = [String]
com.arsdigita.cms.contenttypes.publications.publications_step_sort_key.title = Sort key for the publications step
com.arsdigita.cms.contenttypes.publications.publications_step_sort_key.purpose = Sort key for the publications step
com.arsdigita.cms.contenttypes.publications.publications_step_sort_key.example = 11
com.arsdigita.cms.contenttypes.publications.publications_step_sort_key = [Integer]
com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step.title = Attach PublisherPublications step com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step.title = Attach PublisherPublications step
com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step.purpose = Attaches an authoring step to Publisher which displays all publications the publisher is assigned to com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step.purpose = Attaches an authoring step to Publisher which displays all publications the publisher is assigned to
com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step.example = true com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step.example = true
com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step.format = [Boolean] com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step.format = [Boolean]
com.arsdigita.cms.contenttypes.publications.publisher_publications_step_sort_key.title = Sort key for he PublisherPublications step
com.arsdigita.cms.contenttypes.publications.publisher_publications_step_sort_key.purpose = Sort key for he PublisherPublications step
com.arsdigita.cms.contenttypes.publications.publisher_publications_step_sort_key.example = 10
com.arsdigita.cms.contenttypes.publications.publisher_publications_step_sort_key = [Integer]
com.arsdigita.cms.contenttypes.publications.default_authors_folder.title = ID of the default folder for items created using the create pane of the ItemSearchWidget com.arsdigita.cms.contenttypes.publications.default_authors_folder.title = ID of the default folder for items created using the create pane of the ItemSearchWidget
com.arsdigita.cms.contenttypes.publications.default_authors_folder.purpose = Default folder for items created using the create pane of the ItemSearchWidget com.arsdigita.cms.contenttypes.publications.default_authors_folder.purpose = Default folder for items created using the create pane of the ItemSearchWidget
com.arsdigita.cms.contenttypes.publications.default_authors_folder.example = 10002 com.arsdigita.cms.contenttypes.publications.default_authors_folder.example = 10002
com.arsdigita.cms.contenttypes.publications.default_authors_folder.format = Integer com.arsdigita.cms.contenttypes.publications.default_authors_folder.format = [Integer]
com.arsdigita.cms.contenttypes.publications.default_series_folder.title = ID of the default folder for items created using the create pane of the ItemSearchWidget com.arsdigita.cms.contenttypes.publications.default_series_folder.title = ID of the default folder for items created using the create pane of the ItemSearchWidget
com.arsdigita.cms.contenttypes.publications.default_series_folder.purpose = Default folder for items created using the create pane of the ItemSearchWidget com.arsdigita.cms.contenttypes.publications.default_series_folder.purpose = Default folder for items created using the create pane of the ItemSearchWidget

View File

@ -61,7 +61,7 @@ public class PublisherInitializer extends ContentTypeInitializer {
PublisherPublicationsStep.class, PublisherPublicationsStep.class,
PublicationGlobalizationUtil.globalize("publisher.ui.publications.title"), PublicationGlobalizationUtil.globalize("publisher.ui.publications.title"),
PublicationGlobalizationUtil.globalize("publisher.ui.publications.description"), PublicationGlobalizationUtil.globalize("publisher.ui.publications.description"),
10); config.getPublisherPublicationsStepSortKey());
} }
} }

View File

@ -14,9 +14,13 @@ import com.arsdigita.util.parameter.StringParameter;
public class SciDepartmentConfig extends AbstractConfig { public class SciDepartmentConfig extends AbstractConfig {
private final Parameter enableSubDepartmentsStep; private final Parameter enableSubDepartmentsStep;
private final Parameter subDepartmentsStepSortKey;
private final Parameter enableSuperDepartmentsStep; private final Parameter enableSuperDepartmentsStep;
private final Parameter superDepartmentsStepSortKey;
private final Parameter enableProjectsStep; private final Parameter enableProjectsStep;
private final Parameter projectsStepSortKey;
private final Parameter enableProjectDepartmentsStep; private final Parameter enableProjectDepartmentsStep;
private final Parameter projectDepartmentsStepSortKey;
private final Parameter shortDescMaxLength; private final Parameter shortDescMaxLength;
private final Parameter enableDescriptionDhtml; private final Parameter enableDescriptionDhtml;
private final Parameter permittedPersonType; private final Parameter permittedPersonType;
@ -30,24 +34,48 @@ public class SciDepartmentConfig extends AbstractConfig {
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
subDepartmentsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.scidepartment.subdepartments_step_sortkey",
Parameter.REQUIRED,
10);
enableSuperDepartmentsStep = enableSuperDepartmentsStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step", "com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
superDepartmentsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.scidepartment.superdepartments_step_sortkey",
Parameter.REQUIRED,
20);
enableProjectsStep = enableProjectsStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step", "com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
projectsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.scidepartment.projects_step_sortkey",
Parameter.REQUIRED,
30);
enableProjectDepartmentsStep = enableProjectDepartmentsStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step", "com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
projectDepartmentsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.scidepartment.project_departments_step_sortkey",
Parameter.REQUIRED,
40);
shortDescMaxLength = shortDescMaxLength =
new IntegerParameter( new IntegerParameter(
"com.arsdigita.cms.contenttypes.scidepartment.short_desc.max_length", "com.arsdigita.cms.contenttypes.scidepartment.short_desc.max_length",
@ -73,9 +101,13 @@ public class SciDepartmentConfig extends AbstractConfig {
"summary:com.arsdigita.cms.contenttypes.ui.SciDepartmentSummaryTab;desc:com.arsdigita.cms.contenttypes.ui.SciDepartmentDescTab;members:com.arsdigita.cms.contenttypes.ui.SciDepartmentMembersTab;projects:com.arsdigita.cms.contenttypes.ui.SciDepartmentProjectsTab;publications:com.arsdigita.cms.contenttypes.ui.SciDepartmentPublicationsTab"); "summary:com.arsdigita.cms.contenttypes.ui.SciDepartmentSummaryTab;desc:com.arsdigita.cms.contenttypes.ui.SciDepartmentDescTab;members:com.arsdigita.cms.contenttypes.ui.SciDepartmentMembersTab;projects:com.arsdigita.cms.contenttypes.ui.SciDepartmentProjectsTab;publications:com.arsdigita.cms.contenttypes.ui.SciDepartmentPublicationsTab");
register(enableSubDepartmentsStep); register(enableSubDepartmentsStep);
register(subDepartmentsStepSortKey);
register(enableSuperDepartmentsStep); register(enableSuperDepartmentsStep);
register(superDepartmentsStepSortKey);
register(enableProjectsStep); register(enableProjectsStep);
register(projectsStepSortKey);
register(enableProjectDepartmentsStep); register(enableProjectDepartmentsStep);
register(projectDepartmentsStepSortKey);
register(shortDescMaxLength); register(shortDescMaxLength);
register(enableDescriptionDhtml); register(enableDescriptionDhtml);
register(permittedPersonType); register(permittedPersonType);
@ -88,18 +120,34 @@ public class SciDepartmentConfig extends AbstractConfig {
return (Boolean) get(enableSubDepartmentsStep); return (Boolean) get(enableSubDepartmentsStep);
} }
public Integer getSubDepartmentsStepSortKey() {
return (Integer) get(subDepartmentsStepSortKey);
}
public final Boolean getEnableSuperDepartmentsStep() { public final Boolean getEnableSuperDepartmentsStep() {
return (Boolean) get(enableSuperDepartmentsStep); return (Boolean) get(enableSuperDepartmentsStep);
} }
public Integer getSuperDepartmentsStepSortKey() {
return (Integer) get(superDepartmentsStepSortKey);
}
public final Boolean getEnableProjectsStep() { public final Boolean getEnableProjectsStep() {
return (Boolean) get(enableProjectsStep); return (Boolean) get(enableProjectsStep);
} }
public final Boolean getEnableProjectDepartmentsStep() { public Integer getProjectsStepSortKey() {
return (Integer) get(projectsStepSortKey);
}
public final Boolean getEnableProjectDepartmentsStep() {
return (Boolean) get(enableProjectDepartmentsStep); return (Boolean) get(enableProjectDepartmentsStep);
} }
public Integer getProjectDepartmentsStepSortKey() {
return (Integer) get(projectDepartmentsStepSortKey);
}
public Integer getShortDescMaxLength() { public Integer getShortDescMaxLength() {
return (Integer) get(shortDescMaxLength); return (Integer) get(shortDescMaxLength);
} }
@ -115,4 +163,5 @@ public class SciDepartmentConfig extends AbstractConfig {
public final String getTabs() { public final String getTabs() {
return (String) get(tabs); return (String) get(tabs);
} }
} }

View File

@ -3,21 +3,41 @@ com.arsdigita.cms.contenttypes.scidepartment.enable.subdepartments_step.purpose
com.arsdigita.cms.contenttypes.scidepartment.enable.subdepartments_step.example = false com.arsdigita.cms.contenttypes.scidepartment.enable.subdepartments_step.example = false
com.arsdigita.cms.contenttypes.scidepartment.enable.subdepartments_step.format = [Boolean] com.arsdigita.cms.contenttypes.scidepartment.enable.subdepartments_step.format = [Boolean]
com.arsdigita.cms.contenttypes.scidepartment.subdepartments_step_sortkey.title = Sort key for the subordinate departments step
com.arsdigita.cms.contenttypes.scidepartment.subdepartments_step_sortkey.purpose = Sort key for the subordinate departments step
com.arsdigita.cms.contenttypes.scidepartment.subdepartments_step_sortkey.example = 10
com.arsdigita.cms.contenttypes.scidepartment.subdepartments_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step.title = Show authoring step for superior departments? com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step.title = Show authoring step for superior departments?
com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step.purpose = Enables authoring step for adding superior departments to a department com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step.purpose = Enables authoring step for adding superior departments to a department
com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step.example = false com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step.example = false
com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step.format = [Boolean] com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step.format = [Boolean]
com.arsdigita.cms.contenttypes.scidepartment.superdepartments_step_sortkey.title = Sort key for the superior departments step
com.arsdigita.cms.contenttypes.scidepartment.superdepartments_step_sortkey.purpose = Sort key for the superior departments step
com.arsdigita.cms.contenttypes.scidepartment.superdepartments_step_sortkey.example = 20
com.arsdigita.cms.contenttypes.scidepartment.superdepartments_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step.title = Show authoring step for adding projects (if ccm-sci-types-project is installed?) com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step.title = Show authoring step for adding projects (if ccm-sci-types-project is installed?)
com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step.purpose = Enables authoring step for adding projects to a department. Only useful if ccm-sci-types-project is installed. com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step.purpose = Enables authoring step for adding projects to a department. Only useful if ccm-sci-types-project is installed.
com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step.example = false com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step.example = false
com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step.format = [Boolean] com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step.format = [Boolean]
com.arsdigita.cms.contenttypes.scidepartment.projects_step_sortkey.title = Sort key for the projects step
com.arsdigita.cms.contenttypes.scidepartment.projects_step_sortkey.purpose = Sort key for the superior departments step
com.arsdigita.cms.contenttypes.scidepartment.projects_step_sortkey.example = 30
com.arsdigita.cms.contenttypes.scidepartment.projects_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step.title = Add a departments step to ccm-sci-types-project com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step.title = Add a departments step to ccm-sci-types-project
com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step.purpose = If ccm-sci-types-project is installed an authoring step for associating a department with a project can be attached to the authoring steps of SciProject com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step.purpose = If ccm-sci-types-project is installed an authoring step for associating a department with a project can be attached to the authoring steps of SciProject
com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step.example = false com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step.example = false
com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step.format = [Boolean] com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step.format = [Boolean]
com.arsdigita.cms.contenttypes.scidepartment.project_departments_step_sortkey.title = Sort key for project departments step
com.arsdigita.cms.contenttypes.scidepartment.project_departments_step_sortkey.purpose = Sort key for the superior departments step
com.arsdigita.cms.contenttypes.scidepartment.project_departments_step_sortkey.example = 40
com.arsdigita.cms.contenttypes.scidepartment.project_departments_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.scidepartment.short_desc.max_length.title = Short description maximum length com.arsdigita.cms.contenttypes.scidepartment.short_desc.max_length.title = Short description maximum length
com.arsdigita.cms.contenttypes.scidepartment.short_desc.max_length.purpose = Restricts the max length of the short description of a department. Maximum possible value: 5000 com.arsdigita.cms.contenttypes.scidepartment.short_desc.max_length.purpose = Restricts the max length of the short description of a department. Maximum possible value: 5000
com.arsdigita.cms.contenttypes.scidepartment.short_desc.max_length.example = 500 com.arsdigita.cms.contenttypes.scidepartment.short_desc.max_length.example = 500

View File

@ -71,7 +71,7 @@ public class SciDepartmentInitializer extends ContentTypeInitializer {
"scidepartment.ui.subdepartments.title"), "scidepartment.ui.subdepartments.title"),
SciDepartmentGlobalizationUtil.globalize( SciDepartmentGlobalizationUtil.globalize(
"scidepartment.ui.subdepartments.description"), "scidepartment.ui.subdepartments.description"),
10); config.getSubDepartmentsStepSortKey());
} }
if (config.getEnableSuperDepartmentsStep()) { if (config.getEnableSuperDepartmentsStep()) {
@ -82,7 +82,7 @@ public class SciDepartmentInitializer extends ContentTypeInitializer {
"scidepartment.ui.superdepartments.title"), "scidepartment.ui.superdepartments.title"),
SciDepartmentGlobalizationUtil.globalize( SciDepartmentGlobalizationUtil.globalize(
"scidepartment.ui.superdepartments.description"), "scidepartment.ui.superdepartments.description"),
20); config.getSuperDepartmentsStepSortKey());
} }
final ContentTypeCollection contentTypes = ContentType. final ContentTypeCollection contentTypes = ContentType.
@ -100,7 +100,7 @@ public class SciDepartmentInitializer extends ContentTypeInitializer {
"scidepartment.ui.projects.title"), "scidepartment.ui.projects.title"),
SciDepartmentGlobalizationUtil.globalize( SciDepartmentGlobalizationUtil.globalize(
"scidepartment.ui.projects.description"), "scidepartment.ui.projects.description"),
30); config.getProjectsStepSortKey());
} }
if (config.getEnableProjectDepartmentsStep()) { if (config.getEnableProjectDepartmentsStep()) {
@ -111,7 +111,7 @@ public class SciDepartmentInitializer extends ContentTypeInitializer {
"sciproject.ui.departments.title"), "sciproject.ui.departments.title"),
SciDepartmentGlobalizationUtil.globalize( SciDepartmentGlobalizationUtil.globalize(
"sciproject.ui.departments.description"), "sciproject.ui.departments.description"),
40); config.getProjectDepartmentsStepSortKey());
} }
} }
} }

View File

@ -14,19 +14,31 @@ import com.arsdigita.util.parameter.StringParameter;
public class SciInstituteConfig extends AbstractConfig { public class SciInstituteConfig extends AbstractConfig {
private final Parameter enableDepartmentsStep; private final Parameter enableDepartmentsStep;
private final Parameter departmentsStepSortKey;
private final Parameter enableDepartmentInstitutesStep; private final Parameter enableDepartmentInstitutesStep;
private final Parameter departmentInstitutesStepSortKey;
private final Parameter enableProjectsStep; private final Parameter enableProjectsStep;
private final Parameter projectsStepSortKey;
private final Parameter enableProjectInstitutesStep; private final Parameter enableProjectInstitutesStep;
private final Parameter projectInstitutesStepSortKey;
private final Parameter shortDescMaxLength; private final Parameter shortDescMaxLength;
private final Parameter enableDescriptionDhtml; private final Parameter enableDescriptionDhtml;
private final Parameter permittedPersonType; private final Parameter permittedPersonType;
private final Parameter tabs; private final Parameter tabs;
public SciInstituteConfig() { public SciInstituteConfig() {
enableDepartmentsStep = enableDepartmentsStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.sciinstitute.enable.departments_step", "com.arsdigita.cms.contenttypes.sciinstitute.enable.departments_step",
Parameter.REQUIRED, Boolean.TRUE); Parameter.REQUIRED,
Boolean.TRUE);
departmentsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.sciinstitute.departments_step_sortkey",
Parameter.REQUIRED,
10);
enableDepartmentInstitutesStep = enableDepartmentInstitutesStep =
new BooleanParameter( new BooleanParameter(
@ -34,27 +46,45 @@ public class SciInstituteConfig extends AbstractConfig {
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
departmentInstitutesStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.sciinstitute.department_institutes_step_sortkey",
Parameter.REQUIRED,
20);
enableProjectsStep = enableProjectsStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step", "com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
projectsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.sciinstitute.projects_step_sortkey",
Parameter.REQUIRED,
30);
enableProjectInstitutesStep = enableProjectInstitutesStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step", "com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
projectInstitutesStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.sciinstitute.project_institutes_step_sortkey",
Parameter.REQUIRED,
40);
shortDescMaxLength = shortDescMaxLength =
new IntegerParameter( new IntegerParameter(
"com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length", "com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length",
Parameter.REQUIRED, 500); Parameter.REQUIRED, 500);
enableDescriptionDhtml = enableDescriptionDhtml =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.sciinstitute.description.dhtml_enable", "com.arsdigita.cms.contenttypes.sciinstitute.description.dhtml_enable",
Parameter.REQUIRED, Boolean.TRUE); Parameter.REQUIRED, Boolean.TRUE);
permittedPersonType = permittedPersonType =
new StringParameter( new StringParameter(
@ -69,9 +99,13 @@ public class SciInstituteConfig extends AbstractConfig {
"summary:com.arsdigita.cms.contenttypes.ui.SciInstituteSummaryTab;desc:com.arsdigita.cms.contenttypes.ui.SciInstituteDescTab;members:com.arsdigita.cms.contenttypes.ui.SciInstituteMembersTab;projects:com.arsdigita.cms.contenttypes.ui.SciInstituteProjectsTab;publications:com.arsdigita.cms.contenttypes.ui.SciInstitutePublicationsTab"); "summary:com.arsdigita.cms.contenttypes.ui.SciInstituteSummaryTab;desc:com.arsdigita.cms.contenttypes.ui.SciInstituteDescTab;members:com.arsdigita.cms.contenttypes.ui.SciInstituteMembersTab;projects:com.arsdigita.cms.contenttypes.ui.SciInstituteProjectsTab;publications:com.arsdigita.cms.contenttypes.ui.SciInstitutePublicationsTab");
register(enableDepartmentsStep); register(enableDepartmentsStep);
register(departmentsStepSortKey);
register(enableDepartmentInstitutesStep); register(enableDepartmentInstitutesStep);
register(departmentInstitutesStepSortKey);
register(enableProjectsStep); register(enableProjectsStep);
register(projectsStepSortKey);
register(enableProjectInstitutesStep); register(enableProjectInstitutesStep);
register(projectInstitutesStepSortKey);
register(shortDescMaxLength); register(shortDescMaxLength);
register(enableDescriptionDhtml); register(enableDescriptionDhtml);
register(permittedPersonType); register(permittedPersonType);
@ -84,18 +118,34 @@ public class SciInstituteConfig extends AbstractConfig {
return (Boolean) get(enableDepartmentsStep); return (Boolean) get(enableDepartmentsStep);
} }
public final Integer getDepartmentsStepSortKey() {
return (Integer) get(departmentsStepSortKey);
}
public final Boolean getEnableDepartmentInstitutesStep() { public final Boolean getEnableDepartmentInstitutesStep() {
return (Boolean) get(enableDepartmentInstitutesStep); return (Boolean) get(enableDepartmentInstitutesStep);
} }
public final Integer getDepartmentInstitutesStepSortKey() {
return (Integer) get(departmentInstitutesStepSortKey);
}
public final Boolean getEnableProjectsStep() { public final Boolean getEnableProjectsStep() {
return (Boolean) get(enableProjectsStep); return (Boolean) get(enableProjectsStep);
} }
public final Boolean getEnableProjectInstitutesStep() { public final Integer getProjectsStepSortKey() {
return (Integer) get(projectsStepSortKey);
}
public final Boolean getEnableProjectInstitutesStep() {
return (Boolean) get(enableProjectInstitutesStep); return (Boolean) get(enableProjectInstitutesStep);
} }
public final Integer getProjectInstitutesStepSortKey() {
return (Integer) get(projectInstitutesStepSortKey);
}
public Integer getShortDescMaxLength() { public Integer getShortDescMaxLength() {
return (Integer) get(shortDescMaxLength); return (Integer) get(shortDescMaxLength);
} }
@ -111,4 +161,5 @@ public class SciInstituteConfig extends AbstractConfig {
public final String getTabs() { public final String getTabs() {
return (String) get(tabs); return (String) get(tabs);
} }
} }

View File

@ -3,21 +3,41 @@ com.arsdigita.cms.contenttypes.sciinstitute.enable.departments_step.purpose = En
com.arsdigita.cms.contenttypes.sciinstitute.enable.departments_step.example = true com.arsdigita.cms.contenttypes.sciinstitute.enable.departments_step.example = true
com.arsdigita.cms.contenttypes.sciinstitute.enable.departments_step.format = [Boolean] com.arsdigita.cms.contenttypes.sciinstitute.enable.departments_step.format = [Boolean]
com.arsdigita.cms.contenttypes.sciinstitute.departments_step_sortkey.title = Sort key for the departments step
com.arsdigita.cms.contenttypes.sciinstitute.departments_step_sortkey.purpose = Sort key for the departments step
com.arsdigita.cms.contenttypes.sciinstitute.departments_step_sortkey.example = 10
com.arsdigita.cms.contenttypes.sciinstitute.departments_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step.title = Enable institutes step for departments? com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step.title = Enable institutes step for departments?
com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step.purpose = Enable institutes step for departments? com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step.purpose = Enable institutes step for departments?
com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step.example = true com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step.example = true
com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step.format = [Boolean] com.arsdigita.cms.contenttypes.sciinstitute.enable.department_institutes_step.format = [Boolean]
com.arsdigita.cms.contenttypes.sciinstitute.department_institutes_step_sortkey.title = Sort key for the institutes step for departments
com.arsdigita.cms.contenttypes.sciinstitute.department_institutes_step_sortkey.purpose = Sort key for the institutes step for departments
com.arsdigita.cms.contenttypes.sciinstitute.department_institutes_step_sortkey.example = 20
com.arsdigita.cms.contenttypes.sciinstitute.department_institutes_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step.title = Enable projects step? com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step.title = Enable projects step?
com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step.purpose = Enable projects step? com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step.purpose = Enable projects step?
com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step.example = false com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step.example = false
com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step.format = [Boolean] com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step.format = [Boolean]
com.arsdigita.cms.contenttypes.sciinstitute.projects_step_sortkey.title = Sort key for the projects step
com.arsdigita.cms.contenttypes.sciinstitute.projects_step_sortkey.purpose = Sort key for the projects step
com.arsdigita.cms.contenttypes.sciinstitute.projects_step_sortkey.example = 30
com.arsdigita.cms.contenttypes.sciinstitute.projects_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step.title = Enable institutes step for projects? com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step.title = Enable institutes step for projects?
com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step.purpose = Enable institutes step for projects? com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step.purpose = Enable institutes step for projects?
com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step.example = false com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step.example = false
com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step.format = [Boolean] com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step.format = [Boolean]
com.arsdigita.cms.contenttypes.sciinstitute.project_institutes_step_sortkey.title = Sort key for the institutes step for projects
com.arsdigita.cms.contenttypes.sciinstitute.project_institutes_step_sortkey.purpose = Sort key for the institutes step for projects
com.arsdigita.cms.contenttypes.sciinstitute.project_institutes_step_sortkey.example = 40
com.arsdigita.cms.contenttypes.sciinstitute.project_institutes_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length.title = Maximum length for the short description of an institute com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length.title = Maximum length for the short description of an institute
com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length.purpose = Maximum length for the short description of an institute com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length.purpose = Maximum length for the short description of an institute
com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length.example = 500 com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length.example = 500

View File

@ -17,7 +17,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
*/ */
package com.arsdigita.cms.contenttypes; package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ContentType;
@ -64,10 +63,8 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
final SciInstituteConfig config = SciInstitute.getConfig(); final SciInstituteConfig config = SciInstitute.getConfig();
//Add the authoring steps for departments if the department type is installed //Add the authoring steps for departments if the department type is installed
final ContentTypeCollection contentTypes = ContentType. final ContentTypeCollection contentTypes = ContentType.getAllContentTypes();
getAllContentTypes(); contentTypes.addFilter("associatedObjectType = 'com.arsdigita.cms.contenttypes.SciDepartment'");
contentTypes.addFilter(
"associatedObjectType = 'com.arsdigita.cms.contenttypes.SciDepartment'");
if (contentTypes.size() > 0) { if (contentTypes.size() > 0) {
if (config.getEnableDepartmentsStep()) { if (config.getEnableDepartmentsStep()) {
@ -78,7 +75,7 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
"sciinstitute.ui.departments.title"), "sciinstitute.ui.departments.title"),
SciInstituteGlobalizationUtil.globalize( SciInstituteGlobalizationUtil.globalize(
"sciinstitute.ui.departments.description"), "sciinstitute.ui.departments.description"),
10); config.getDepartmentsStepSortKey());
} }
if (config.getEnableDepartmentInstitutesStep()) { if (config.getEnableDepartmentInstitutesStep()) {
@ -89,15 +86,14 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
"scidepartment.ui.institutes.title"), "scidepartment.ui.institutes.title"),
SciInstituteGlobalizationUtil.globalize( SciInstituteGlobalizationUtil.globalize(
"scidepartment.ui.institutes.description"), "scidepartment.ui.institutes.description"),
20); config.getDepartmentInstitutesStepSortKey());
} }
} }
contentTypes.reset(); contentTypes.reset();
//Add the authoring steps for projects if the project type is installed //Add the authoring steps for projects if the project type is installed
contentTypes.addFilter( contentTypes.addFilter("associatedObjectType = 'com.arsdigita.cms.contenttypes.SciProject'");
"associatedObjectType = 'com.arsdigita.cms.contenttypes.SciProject'");
if (contentTypes.size() > 0) { if (contentTypes.size() > 0) {
if (config.getEnableProjectsStep()) { if (config.getEnableProjectsStep()) {
@ -108,7 +104,7 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
"sciinstitute.ui.projects.title"), "sciinstitute.ui.projects.title"),
SciInstituteGlobalizationUtil.globalize( SciInstituteGlobalizationUtil.globalize(
"sciinstitute.ui.projects.description"), "sciinstitute.ui.projects.description"),
30); config.getProjectsStepSortKey());
} }
if (config.getEnableProjectInstitutesStep()) { if (config.getEnableProjectInstitutesStep()) {
@ -120,7 +116,7 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
"sciproject.ui.institutes.title"), "sciproject.ui.institutes.title"),
SciInstituteGlobalizationUtil.globalize( SciInstituteGlobalizationUtil.globalize(
"sciproject.ui.institutes.description"), "sciproject.ui.institutes.description"),
40); config.getProjectInstitutesStepSortKey());
} }
} }
} }
@ -142,8 +138,8 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
@Override @Override
public String[] getStylesheets() { public String[] getStylesheets() {
return new String[]{ return new String[]{
INTERNAL_THEME_TYPES_DIR + "sci/SciInstitute.xsl" INTERNAL_THEME_TYPES_DIR + "sci/SciInstitute.xsl"
}; };
} }
/** /**
@ -152,7 +148,7 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
*/ */
@Override @Override
public String getTraversalXML() { public String getTraversalXML() {
return return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciInstitute.xml";
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciInstitute.xml";
} }
} }

View File

@ -15,8 +15,11 @@ import com.arsdigita.util.parameter.StringParameter;
public class SciProjectConfig extends AbstractConfig { public class SciProjectConfig extends AbstractConfig {
private final Parameter enableSubProjectsStep; private final Parameter enableSubProjectsStep;
private final Parameter subProjectsStepSortKey;
private final Parameter enableSuperProjectsStep; private final Parameter enableSuperProjectsStep;
private final Parameter superProjectsStepSortKey;
private final Parameter enableInvolvedOrgasStep; private final Parameter enableInvolvedOrgasStep;
private final Parameter involvedOrgasStepSortKey;
private final Parameter shortDescMaxLength; private final Parameter shortDescMaxLength;
private final Parameter enableDescriptionDhtml; private final Parameter enableDescriptionDhtml;
private final Parameter enableMembersAllInOne; private final Parameter enableMembersAllInOne;
@ -36,17 +39,35 @@ public class SciProjectConfig extends AbstractConfig {
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
subProjectsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.sciproject.sub_projects_step_sortkey",
Parameter.REQUIRED,
10);
enableSuperProjectsStep = enableSuperProjectsStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step", "com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
superProjectsStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.sciproject.super_projects_step_sortkey",
Parameter.REQUIRED,
20);
enableInvolvedOrgasStep = enableInvolvedOrgasStep =
new BooleanParameter( new BooleanParameter(
"com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step", "com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step",
Parameter.REQUIRED, Parameter.REQUIRED,
Boolean.TRUE); Boolean.TRUE);
involvedOrgasStepSortKey =
new IntegerParameter(
"com.arsdigita.cms.contenttypes.sciproject.involved_orgas_step",
Parameter.REQUIRED,
30);
shortDescMaxLength = new IntegerParameter( shortDescMaxLength = new IntegerParameter(
"com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length", "com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length",
@ -105,8 +126,11 @@ public class SciProjectConfig extends AbstractConfig {
"summary:com.arsdigita.cms.contenttypes.ui.SciProjectSummaryTab;desc:com.arsdigita.cms.contenttypes.ui.SciProjectDescTab"); "summary:com.arsdigita.cms.contenttypes.ui.SciProjectSummaryTab;desc:com.arsdigita.cms.contenttypes.ui.SciProjectDescTab");
register(enableSubProjectsStep); register(enableSubProjectsStep);
register(subProjectsStepSortKey);
register(enableSuperProjectsStep); register(enableSuperProjectsStep);
register(superProjectsStepSortKey);
register(enableInvolvedOrgasStep); register(enableInvolvedOrgasStep);
register(involvedOrgasStepSortKey);
register(shortDescMaxLength); register(shortDescMaxLength);
register(enableDescriptionDhtml); register(enableDescriptionDhtml);
register(enableMembersAllInOne); register(enableMembersAllInOne);
@ -125,14 +149,26 @@ public class SciProjectConfig extends AbstractConfig {
return (Boolean) get(enableSubProjectsStep); return (Boolean) get(enableSubProjectsStep);
} }
public final Integer getSubProjectsStepSortKey() {
return (Integer) get(subProjectsStepSortKey);
}
public final boolean getEnableSuperProjectsStep() { public final boolean getEnableSuperProjectsStep() {
return (Boolean) get(enableSuperProjectsStep); return (Boolean) get(enableSuperProjectsStep);
} }
public final Integer getSuperProjectsStepSortKey() {
return (Integer) get(subProjectsStepSortKey);
}
public final boolean getEnableInvolvedOrgasStep() { public final boolean getEnableInvolvedOrgasStep() {
return (Boolean) get(enableInvolvedOrgasStep); return (Boolean) get(enableInvolvedOrgasStep);
} }
public final Integer getInvolvedOrgasStepSortKey() {
return (Integer) get(subProjectsStepSortKey);
}
public final int getShortDescMaxLength() { public final int getShortDescMaxLength() {
return (Integer) get(shortDescMaxLength); return (Integer) get(shortDescMaxLength);
} }
@ -174,4 +210,5 @@ public class SciProjectConfig extends AbstractConfig {
public final String getTabs() { public final String getTabs() {
return (String) get(tabs); return (String) get(tabs);
} }
} }

View File

@ -3,16 +3,31 @@ com.arsdigita.cms.contenttypes.sciproject.enable_sub_projects_step.purpose = Ena
com.arsdigita.cms.contenttypes.sciproject.enable_sub_projects_step.example = false com.arsdigita.cms.contenttypes.sciproject.enable_sub_projects_step.example = false
com.arsdigita.cms.contenttypes.sciproject.enable_sub_projects_step.format = [Boolean] com.arsdigita.cms.contenttypes.sciproject.enable_sub_projects_step.format = [Boolean]
com.arsdigita.cms.contenttypes.sciproject.sub_projects_step_sortkey.title = Sort key for the sub projects step
com.arsdigita.cms.contenttypes.sciproject.sub_projects_step_sortkey.purpose = Sort key for the sub projects step
com.arsdigita.cms.contenttypes.sciproject.sub_projects_step_sortkey.example = 10
com.arsdigita.cms.contenttypes.sciproject.sub_projects_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step.title = Show super projects step? com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step.title = Show super projects step?
com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step.purpose = Enables authoring step to set the super project of project com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step.purpose = Enables authoring step to set the super project of project
com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step.exampe = false com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step.exampe = false
com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step.format = [Boolean] com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step.format = [Boolean]
com.arsdigita.cms.contenttypes.sciproject.super_projects_step_sortkey.title = Sort key for the super projects step
com.arsdigita.cms.contenttypes.sciproject.super_projects_step_sortkey.purpose = Sort key for the super projects step
com.arsdigita.cms.contenttypes.sciproject.super_projects_step_sortkey.example = 20
com.arsdigita.cms.contenttypes.sciproject.super_projects_step_sortkey.format = [Integer]
com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step.title = Show involved organizations step? com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step.title = Show involved organizations step?
com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step.purpose = Enables authoring step form managing organizations involved with the project com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step.purpose = Enables authoring step form managing organizations involved with the project
com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step.example = true com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step.example = true
com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step.format = [Boolean] com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step.format = [Boolean]
com.arsdigita.cms.contenttypes.sciproject.involved_orgas_step.title = Sort key for the involved organisations step
com.arsdigita.cms.contenttypes.sciproject.involved_orgas_step.purpose = Sort key for the involved organisations step
com.arsdigita.cms.contenttypes.sciproject.involved_orgas_step.example = 30
com.arsdigita.cms.contenttypes.sciproject.involved_orgas_step.format = [Integer]
com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length.title = Short description maximum length com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length.title = Short description maximum length
com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length.purpose = Maximum length for the short description of a SciProject item in characters. com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length.purpose = Maximum length for the short description of a SciProject item in characters.
com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length.example = 500 com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length.example = 500

View File

@ -73,7 +73,7 @@ public class SciProjectInitializer extends ContentTypeInitializer {
"sciproject.ui.subprojects.title"), "sciproject.ui.subprojects.title"),
SciProjectGlobalizationUtil.globalize( SciProjectGlobalizationUtil.globalize(
"sciproject.ui.subprojects.description"), "sciproject.ui.subprojects.description"),
10); config.getSubProjectsStepSortKey());
} }
if (config.getEnableSuperProjectsStep()) { if (config.getEnableSuperProjectsStep()) {
@ -84,7 +84,7 @@ public class SciProjectInitializer extends ContentTypeInitializer {
"sciproject.ui.superprojects.title"), "sciproject.ui.superprojects.title"),
SciProjectGlobalizationUtil.globalize( SciProjectGlobalizationUtil.globalize(
"sciproject.ui.superprojects.description"), "sciproject.ui.superprojects.description"),
20); config.getSuperProjectsStepSortKey());
} }
if (config.getEnableInvolvedOrgasStep()) { if (config.getEnableInvolvedOrgasStep()) {
@ -95,7 +95,7 @@ public class SciProjectInitializer extends ContentTypeInitializer {
"sciproject.ui.involved_orgas.title"), "sciproject.ui.involved_orgas.title"),
SciProjectGlobalizationUtil.globalize( SciProjectGlobalizationUtil.globalize(
"sciproject.ui.involved_orgas.description"), "sciproject.ui.involved_orgas.description"),
30); config.getInvolvedOrgasStepSortKey());
} }
} }