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-94f89814c4dfmaster
parent
98f4af8da3
commit
b124d88518
|
|
@ -15,7 +15,6 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.cms.contentassets;
|
||||
|
||||
import com.arsdigita.runtime.AbstractConfig;
|
||||
|
|
@ -32,7 +31,6 @@ public class DublinCoreConfig extends AbstractConfig {
|
|||
|
||||
/** A logger instance to assist debugging. */
|
||||
private static final Logger s_log = Logger.getLogger(DublinCoreConfig.class);
|
||||
|
||||
/** Singelton config object. */
|
||||
private static DublinCoreConfig s_conf;
|
||||
|
||||
|
|
@ -52,11 +50,9 @@ public class DublinCoreConfig extends AbstractConfig {
|
|||
return s_conf;
|
||||
}
|
||||
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// set of configuration parameters
|
||||
|
||||
/** Default Audience Domain Key preset in the authoring step ui */
|
||||
private Parameter m_audience = new StringParameter(
|
||||
"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",
|
||||
Parameter.OPTIONAL,
|
||||
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.
|
||||
|
|
@ -117,6 +118,7 @@ public class DublinCoreConfig extends AbstractConfig {
|
|||
register(m_publisher);
|
||||
register(m_use_ccn_portal);
|
||||
register(m_relatedItemsSubjectDomain);
|
||||
register(m_assetStepSortKey);
|
||||
|
||||
loadInfo();
|
||||
}
|
||||
|
|
@ -126,43 +128,48 @@ public class DublinCoreConfig extends AbstractConfig {
|
|||
* @return
|
||||
*/
|
||||
public String getAudienceDomain() {
|
||||
return (String)get(m_audience);
|
||||
return (String) get(m_audience);
|
||||
}
|
||||
|
||||
public String getCoverageSpatialDomain() {
|
||||
return (String)get(m_coverageSpatial);
|
||||
return (String) get(m_coverageSpatial);
|
||||
}
|
||||
|
||||
public String getCoverageUnitDomain() {
|
||||
return (String)get(m_coverageUnit);
|
||||
return (String) get(m_coverageUnit);
|
||||
}
|
||||
|
||||
public String getOwnerDefault() {
|
||||
return (String)get(m_owner);
|
||||
return (String) get(m_owner);
|
||||
}
|
||||
|
||||
public String getRightsDefault() {
|
||||
return (String)get(m_rights);
|
||||
return (String) get(m_rights);
|
||||
}
|
||||
|
||||
public String getPublisherDefault() {
|
||||
return (String)get(m_publisher);
|
||||
return (String) get(m_publisher);
|
||||
}
|
||||
|
||||
public boolean getUseCCNPortalMetadata() {
|
||||
return ((Boolean)get(m_use_ccn_portal)).booleanValue();
|
||||
return ((Boolean) get(m_use_ccn_portal)).booleanValue();
|
||||
}
|
||||
|
||||
public String getRelatedItemsSubjectDomain() {
|
||||
return (String)get(m_relatedItemsSubjectDomain);
|
||||
return (String) get(m_relatedItemsSubjectDomain);
|
||||
}
|
||||
|
||||
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
|
||||
void setRelatedItemsSubjectDomain(String domain) {
|
||||
set(m_relatedItemsSubjectDomain, domain);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.example=LGCL
|
||||
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]
|
||||
|
|
|
|||
|
|
@ -87,6 +87,6 @@ public class DublinCoreInitializer extends ContentAssetInitializer {
|
|||
* The sort key for the authoring step
|
||||
*/
|
||||
public int getAuthoringStepSortKey() {
|
||||
return 3; // XXX config param please
|
||||
return DublinCoreInstance.instanceOf().getAssetStepSortKey();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.arsdigita.bebop.FormSection;
|
|||
import com.arsdigita.runtime.AbstractConfig;
|
||||
import com.arsdigita.util.parameter.SpecificClassParameter;
|
||||
import com.arsdigita.util.parameter.BooleanParameter;
|
||||
import com.arsdigita.util.parameter.IntegerParameter;
|
||||
import com.arsdigita.util.parameter.Parameter;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
|
@ -13,14 +14,11 @@ public class FileAttachmentConfig extends AbstractConfig {
|
|||
|
||||
/** A logger instance to assist debugging. */
|
||||
private static final Logger s_log = Logger.getLogger(FileAttachmentConfig.class);
|
||||
|
||||
/** Singelton config object. */
|
||||
private static FileAttachmentConfig s_conf;
|
||||
|
||||
/**
|
||||
* Gain a DublinCoreConfig object.
|
||||
*
|
||||
* Singelton pattern, don't instantiate a config object using the
|
||||
* Singleton pattern, don't instantiate a config object using the
|
||||
* constructor directly!
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -33,38 +31,45 @@ public class FileAttachmentConfig extends AbstractConfig {
|
|||
return s_conf;
|
||||
}
|
||||
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// set of configuration parameters
|
||||
|
||||
/**
|
||||
* A form which should be used for editing file asset properties.
|
||||
* Default implementation edits Assets.description property.
|
||||
*/
|
||||
Parameter editFormClass = new SpecificClassParameter(
|
||||
private final Parameter editFormClass =
|
||||
new SpecificClassParameter(
|
||||
"com.arsdigita.cms.contentassets.file_edit_form",
|
||||
Parameter.REQUIRED,
|
||||
FileDescriptionForm.class,
|
||||
FormSection.class
|
||||
);
|
||||
FormSection.class);
|
||||
/**
|
||||
* Optional parameter if set to TRUE will disply the asset URL instead of
|
||||
* the description on AttachFile Authroing step. Default: FALSE
|
||||
*/
|
||||
Parameter showAssetID = new BooleanParameter(
|
||||
private final Parameter showAssetID =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contentassets.file_show_asset_id",
|
||||
Parameter.OPTIONAL,
|
||||
Boolean.FALSE
|
||||
);
|
||||
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!
|
||||
*/
|
||||
public FileAttachmentConfig() {
|
||||
protected FileAttachmentConfig() {
|
||||
|
||||
super();
|
||||
|
||||
register(editFormClass);
|
||||
register(showAssetID);
|
||||
register(fileAttachmentStepSortKey);
|
||||
|
||||
loadInfo();
|
||||
}
|
||||
|
||||
|
|
@ -72,8 +77,12 @@ public class FileAttachmentConfig extends AbstractConfig {
|
|||
return (Class) get(editFormClass);
|
||||
}
|
||||
|
||||
public boolean isShowAssetIDEnabled(){
|
||||
public boolean isShowAssetIDEnabled() {
|
||||
return get(showAssetID).equals(Boolean.TRUE);
|
||||
}
|
||||
|
||||
public Integer getFileAttachmentStepSortKey() {
|
||||
return (Integer) get(fileAttachmentStepSortKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.example=TRUE
|
||||
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]
|
||||
|
|
@ -140,7 +140,7 @@ public class FileAttachmentInitializer extends ContentAssetInitializer {
|
|||
* The sort key for the authoring step
|
||||
*/
|
||||
public int getAuthoringStepSortKey() {
|
||||
return 2; // XXX config param please
|
||||
return FileAttachmentConfig.instanceOf().getFileAttachmentStepSortKey();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ package com.arsdigita.cms.contentassets;
|
|||
|
||||
import com.arsdigita.runtime.AbstractConfig;
|
||||
import com.arsdigita.util.parameter.BooleanParameter;
|
||||
import com.arsdigita.util.parameter.IntegerParameter;
|
||||
import com.arsdigita.util.parameter.Parameter;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* A record containing server-session scoped configuration properties.
|
||||
*
|
||||
|
|
@ -40,7 +40,6 @@ public final class ItemImageAttachmentConfig extends AbstractConfig {
|
|||
|
||||
/** A logger instance to assist debugging. */
|
||||
private static final Logger s_log = Logger.getLogger(ItemImageAttachmentConfig.class);
|
||||
|
||||
/** Singelton config object. */
|
||||
private static ItemImageAttachmentConfig s_conf;
|
||||
|
||||
|
|
@ -60,15 +59,14 @@ public final class ItemImageAttachmentConfig extends AbstractConfig {
|
|||
return s_conf;
|
||||
}
|
||||
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// set of configuration parameters
|
||||
|
||||
// Are the description and title properties available for
|
||||
// display/editing. These properties are used by the
|
||||
// ImageGallery content type.
|
||||
private final Parameter m_isImageStepDescriptionAndTitleShown;
|
||||
private final Parameter m_imageStepSortKey;
|
||||
|
||||
/**
|
||||
* Do not instantiate this class directly.
|
||||
|
|
@ -77,12 +75,19 @@ public final class ItemImageAttachmentConfig extends AbstractConfig {
|
|||
**/
|
||||
public ItemImageAttachmentConfig() {
|
||||
|
||||
m_isImageStepDescriptionAndTitleShown = new BooleanParameter
|
||||
("com.arsdigita.cms.m_is_image_step_description_and_title_shown",
|
||||
Parameter.REQUIRED, new Boolean(false));
|
||||
m_isImageStepDescriptionAndTitleShown =
|
||||
new BooleanParameter(
|
||||
"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_imageStepSortKey);
|
||||
|
||||
loadInfo();
|
||||
}
|
||||
|
|
@ -90,4 +95,9 @@ public final class ItemImageAttachmentConfig extends AbstractConfig {
|
|||
public final boolean getIsImageStepDescriptionAndTitleShown() {
|
||||
return ((Boolean) get(m_isImageStepDescriptionAndTitleShown)).booleanValue();
|
||||
}
|
||||
|
||||
public final Integer getImageStepSortKey() {
|
||||
return (Integer) get(m_imageStepSortKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.example=false
|
||||
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]
|
||||
|
|
@ -15,7 +15,6 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.cms.contentassets;
|
||||
|
||||
import com.arsdigita.cms.ContentPage;
|
||||
|
|
@ -47,27 +46,26 @@ public class ItemImageAttachmentInitializer extends ContentAssetInitializer {
|
|||
* @param ev
|
||||
*/
|
||||
@Override
|
||||
public void init( DomainInitEvent ev ) {
|
||||
public void init(DomainInitEvent ev) {
|
||||
|
||||
super.init(ev);
|
||||
|
||||
DomainObjectFactory.registerInstantiator(
|
||||
ItemImageAttachment.BASE_DATA_OBJECT_TYPE,
|
||||
new DomainObjectInstantiator() {
|
||||
protected DomainObject doNewInstance( DataObject obj ) {
|
||||
return new ItemImageAttachment( obj );
|
||||
protected DomainObject doNewInstance(DataObject obj) {
|
||||
return new ItemImageAttachment(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainObjectInstantiator resolveInstantiator( DataObject obj ) {
|
||||
public DomainObjectInstantiator resolveInstantiator(DataObject obj) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The base type against which the asset is defined,
|
||||
* typically com.arsdigita.cms.ContentPage
|
||||
|
|
@ -81,8 +79,7 @@ public class ItemImageAttachmentInitializer extends ContentAssetInitializer {
|
|||
* /WEB-INF/traversal-adapters/com/arsdigita/cms/contentassets/FileAttachments.xml
|
||||
*/
|
||||
public String getTraversalXML() {
|
||||
return "/WEB-INF/traversal-adapters/com/arsdigita/" +
|
||||
"cms/contentassets/ItemImageAttachment.xml";
|
||||
return "/WEB-INF/traversal-adapters/com/arsdigita/" + "cms/contentassets/ItemImageAttachment.xml";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -120,6 +117,7 @@ public class ItemImageAttachmentInitializer extends ContentAssetInitializer {
|
|||
* The sort key for the authoring step
|
||||
*/
|
||||
public int getAuthoringStepSortKey() {
|
||||
return 1; // XXX config param please
|
||||
return ItemImageAttachmentConfig.instanceOf().getImageStepSortKey();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<registry>
|
||||
<!-- nothing yet -->
|
||||
<config class="com.arsdigita.cms.contentassets.NotesConfig"
|
||||
storage="ccm-cms-assets/notes.properties"/>
|
||||
</registry>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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]
|
||||
|
|
@ -118,6 +118,6 @@ public class NotesInitializer extends ContentAssetInitializer {
|
|||
* The sort key for the authoring step
|
||||
*/
|
||||
public int getAuthoringStepSortKey() {
|
||||
return 3;
|
||||
return NotesConfig.getInstance().getAssetStepSortKey();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<registry>
|
||||
<!-- nothing yet -->
|
||||
<config class="com.arsdigita.cms.contentassets.RelatedLinkConfig"
|
||||
storage="ccm-cms-assets/relatedlink.properties"/>
|
||||
</registry>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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]
|
||||
|
|
@ -95,6 +95,6 @@ public class RelatedLinkInitializer extends ContentAssetInitializer {
|
|||
* The sort key for the authoring step
|
||||
*/
|
||||
public int getAuthoringStepSortKey() {
|
||||
return 1; // XXX config param please
|
||||
return RelatedLinkConfig.getInstance().getAssetStepSortKey();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -630,6 +630,12 @@ public final class CMSConfig extends AbstractConfig {
|
|||
"com.arsdigita.cms.contenttypes.genericperson.attach_person_orgaunits_step",
|
||||
Parameter.REQUIRED,
|
||||
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}
|
||||
*/
|
||||
|
|
@ -761,6 +767,7 @@ public final class CMSConfig extends AbstractConfig {
|
|||
register(m_itemSearchFlatBrowsePanePageSize);
|
||||
|
||||
register(m_attachPersonOrgaUnitsStep);
|
||||
register(m_personOrgaUnitsStepSortKey);
|
||||
|
||||
register(m_enableXmlCache);
|
||||
register(m_xmlCacheSize);
|
||||
|
|
@ -1242,6 +1249,10 @@ public final class CMSConfig extends AbstractConfig {
|
|||
return (Boolean) get(m_attachPersonOrgaUnitsStep);
|
||||
}
|
||||
|
||||
public Integer getPersonOrgaUnitsStepSortKey() {
|
||||
return (Integer) get(m_personOrgaUnitsStepSortKey);
|
||||
}
|
||||
|
||||
public Boolean getEnableXmlCache() {
|
||||
return (Boolean) get(m_enableXmlCache);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.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.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.purpose=Enable a XML cache for the SimpleXMLGenerator
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ public class Initializer extends CompoundInitializer {
|
|||
GenericPersonOrgaUnitsStep.class,
|
||||
ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"),
|
||||
ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"),
|
||||
20);
|
||||
s_conf.getPersonOrgaUnitsStepSortKey());
|
||||
}
|
||||
|
||||
s_log.debug("CMS.Initializer.init(DomainInitEvent) completed");
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ import com.arsdigita.web.RedirectSignal;
|
|||
import com.arsdigita.xml.Element;
|
||||
import com.arsdigita.xml.XML;
|
||||
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
@ -62,11 +61,9 @@ import com.arsdigita.xml.XML;
|
|||
public abstract class ACSObjectCategorySummary extends SimpleComponent {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(ACSObjectCategorySummary.class);
|
||||
|
||||
public static final String ACTION_DELETE = "delete";
|
||||
public static final String ACTION_ADD = "add";
|
||||
public static final String ACTION_ADD_JS = "addJS";
|
||||
|
||||
private Map m_listeners = new HashMap();
|
||||
|
||||
public ACSObjectCategorySummary() {
|
||||
|
|
@ -85,7 +82,7 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
|
|||
Assert.isTrue(canEdit(state), "User can edit object");
|
||||
|
||||
String name = state.getControlEventName();
|
||||
ActionListener listener = (ActionListener)m_listeners.get(name);
|
||||
ActionListener listener = (ActionListener) m_listeners.get(name);
|
||||
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("Got event " + name + " listener " + listener);
|
||||
|
|
@ -115,9 +112,6 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
|
|||
return PermissionService.checkPermission(edit);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected abstract ACSObject getObject(PageState state);
|
||||
|
||||
protected abstract String getXMLPrefix();
|
||||
|
|
@ -126,7 +120,6 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
|
|||
|
||||
protected abstract RootCategoryCollection getRootCategories(PageState state);
|
||||
|
||||
|
||||
public void generateXML(PageState state,
|
||||
Element parent) {
|
||||
|
||||
|
|
@ -174,7 +167,7 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
|
|||
getXMLNameSpace());
|
||||
CategoryCollection cats = new CategorizedObject(getObject(state)).getParents();
|
||||
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
|
||||
|
|
@ -184,7 +177,7 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
|
|||
parents.addOrder(Category.DEFAULT_ANCESTORS);
|
||||
|
||||
while (parents.next()) {
|
||||
Category par = (Category)parents.getCategory();
|
||||
Category par = (Category) parents.getCategory();
|
||||
if (path.length() != 0) {
|
||||
path.append(" -> ");
|
||||
}
|
||||
|
|
@ -212,23 +205,24 @@ public abstract class ACSObjectCategorySummary extends SimpleComponent {
|
|||
}
|
||||
|
||||
private class DeleteActionListener implements ActionListener {
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
PageState state = e.getPageState();
|
||||
String value = state.getControlEventValue();
|
||||
|
||||
Category cat = (Category)DomainObjectFactory
|
||||
Category cat = (Category) DomainObjectFactory
|
||||
.newInstance(new OID(Category.BASE_DATA_OBJECT_TYPE,
|
||||
new BigDecimal(value)));
|
||||
ACSObject object = getObject(state);
|
||||
|
||||
if (s_log.isDebugEnabled()) {
|
||||
s_log.debug("Removing category " + cat + " from " + object
|
||||
);
|
||||
s_log.debug("Removing category " + cat + " from " + object);
|
||||
}
|
||||
cat.removeChild(object);
|
||||
|
||||
state.clearControlEvent();
|
||||
throw new RedirectSignal(state.toURL(), true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
name="scientificcms"
|
||||
prettyName="Scientific CMS"
|
||||
version="2.1.0"
|
||||
release="SNAPSHOT-r2164"
|
||||
release="SNAPSHOT-r2170"
|
||||
webxml="web-sci.xml"
|
||||
webapp="ROOT"
|
||||
xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd">
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class PublicationInitializer extends ContentTypeInitializer {
|
|||
PublicationGenericOrganizationalUnitsStep.class,
|
||||
PublicationGlobalizationUtil.globalize("publications.ui.orgaunits.title"),
|
||||
PublicationGlobalizationUtil.globalize("publications.ui.orgaunits.description"),
|
||||
10);
|
||||
config.getOrgaUnitsStepSortKey());
|
||||
}
|
||||
|
||||
final String attachToStr = config.getAttachPublicationsStepTo();
|
||||
|
|
@ -91,7 +91,7 @@ public class PublicationInitializer extends ContentTypeInitializer {
|
|||
"genericorganizationalunit.ui.publications.title"),
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"genericorganizationalunit.ui.publications.description"),
|
||||
10);
|
||||
config.getPublicationsStepSortKey());
|
||||
}
|
||||
|
||||
if (config.getAttachPersonPublicationsStep()) {
|
||||
|
|
@ -100,7 +100,7 @@ public class PublicationInitializer extends ContentTypeInitializer {
|
|||
PersonPublicationsStep.class,
|
||||
PublicationGlobalizationUtil.globalize("person.ui.publications.title"),
|
||||
PublicationGlobalizationUtil.globalize("person.ui.publications.description"),
|
||||
10);
|
||||
config.getPersonPublicationsStepSortKey());
|
||||
}
|
||||
|
||||
final String attachOrgaPubStepTo = config.getAttachOrganizationPublicationsStepTo();
|
||||
|
|
@ -120,7 +120,7 @@ public class PublicationInitializer extends ContentTypeInitializer {
|
|||
OrganizationPublicationsStep.class,
|
||||
PublicationGlobalizationUtil.globalize("organization.ui.publications.title"),
|
||||
PublicationGlobalizationUtil.globalize("organization.ui.publications.description"),
|
||||
11);
|
||||
config.getOrganizationPublicationsStepSortKey());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,10 +14,15 @@ import com.arsdigita.util.parameter.StringParameter;
|
|||
public class PublicationsConfig extends AbstractConfig {
|
||||
|
||||
private final Parameter attachOrgaUnitsStep;
|
||||
private final Parameter orgaUnitsStepSortKey;
|
||||
private final Parameter attachOrganizationPublicationsStepTo;
|
||||
private final Parameter organizationPublicationsStepSortKey;
|
||||
private final Parameter attachPersonPublicationsStep;
|
||||
private final Parameter personPublicationsStepSortKey;
|
||||
private final Parameter attachPublicationsStepTo;
|
||||
private final Parameter publicationsStepSortKey;
|
||||
private final Parameter attachPublisherPublicationsStep;
|
||||
private final Parameter publisherPublicationsStepSortKey;
|
||||
private final Parameter defaultAuthorsFolder;
|
||||
private final Parameter defaultSeriesFolder;
|
||||
private final Parameter defaultPublisherFolder;
|
||||
|
|
@ -41,30 +46,60 @@ public class PublicationsConfig extends AbstractConfig {
|
|||
Parameter.REQUIRED,
|
||||
Boolean.FALSE);
|
||||
|
||||
orgaUnitsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.orgaunits_step_sort_key",
|
||||
Parameter.REQUIRED,
|
||||
10);
|
||||
|
||||
attachOrganizationPublicationsStepTo =
|
||||
new StringParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.attach_organization_publications_step_to",
|
||||
Parameter.REQUIRED,
|
||||
"");
|
||||
|
||||
organizationPublicationsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.organization_publications_step_sort_key",
|
||||
Parameter.REQUIRED,
|
||||
10);
|
||||
|
||||
attachPersonPublicationsStep =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.attach_person_publications_step",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
personPublicationsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.person_publications_step_sort_key",
|
||||
Parameter.REQUIRED,
|
||||
10);
|
||||
|
||||
attachPublicationsStepTo =
|
||||
new StringParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.attach_publications_step_to",
|
||||
Parameter.REQUIRED,
|
||||
"");
|
||||
|
||||
publicationsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.publications_step_sort_key",
|
||||
Parameter.REQUIRED,
|
||||
11);
|
||||
|
||||
attachPublisherPublicationsStep =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.attach_publisher_publications_step",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
publisherPublicationsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.publisher_publications_step_sort_key",
|
||||
Parameter.REQUIRED,
|
||||
10);
|
||||
|
||||
defaultAuthorsFolder = new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.publications.default_authors_folder",
|
||||
Parameter.OPTIONAL,
|
||||
|
|
@ -140,10 +175,15 @@ public class PublicationsConfig extends AbstractConfig {
|
|||
true);
|
||||
|
||||
register(attachOrgaUnitsStep);
|
||||
register(orgaUnitsStepSortKey);
|
||||
register(attachOrganizationPublicationsStepTo);
|
||||
register(organizationPublicationsStepSortKey);
|
||||
register(attachPersonPublicationsStep);
|
||||
register(personPublicationsStepSortKey);
|
||||
register(attachPublicationsStepTo);
|
||||
register(publicationsStepSortKey);
|
||||
register(attachPublisherPublicationsStep);
|
||||
register(publisherPublicationsStepSortKey);
|
||||
register(defaultAuthorsFolder);
|
||||
register(defaultSeriesFolder);
|
||||
register(defaultPublisherFolder);
|
||||
|
|
@ -167,22 +207,42 @@ public class PublicationsConfig extends AbstractConfig {
|
|||
return (Boolean) get(attachOrgaUnitsStep);
|
||||
}
|
||||
|
||||
public Integer getOrgaUnitsStepSortKey() {
|
||||
return (Integer) get(orgaUnitsStepSortKey);
|
||||
}
|
||||
|
||||
public String getAttachOrganizationPublicationsStepTo() {
|
||||
return (String) get(attachOrganizationPublicationsStepTo);
|
||||
}
|
||||
|
||||
public Integer getOrganizationPublicationsStepSortKey() {
|
||||
return (Integer) get(organizationPublicationsStepSortKey);
|
||||
}
|
||||
|
||||
public Boolean getAttachPersonPublicationsStep() {
|
||||
return (Boolean) get(attachPersonPublicationsStep);
|
||||
}
|
||||
|
||||
public Integer getPersonPublicationsStepSortKey() {
|
||||
return (Integer) get(personPublicationsStepSortKey);
|
||||
}
|
||||
|
||||
public String getAttachPublicationsStepTo() {
|
||||
return (String) get(attachPublicationsStepTo);
|
||||
}
|
||||
|
||||
public Integer getPublicationsStepSortKey() {
|
||||
return (Integer) get(publicationsStepSortKey);
|
||||
}
|
||||
|
||||
public Boolean getPublisherPublicationsStep() {
|
||||
return (Boolean) get(attachPublisherPublicationsStep);
|
||||
}
|
||||
|
||||
public Integer getPublisherPublicationsStepSortKey() {
|
||||
return (Integer) get(publisherPublicationsStepSortKey);
|
||||
}
|
||||
|
||||
public Integer getDefaultAuthorsFolder() {
|
||||
if (get(defaultAuthorsFolder) == null) {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -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.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.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.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.example = true
|
||||
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.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.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.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.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.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.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.purpose = Default folder for items created using the create pane of the ItemSearchWidget
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class PublisherInitializer extends ContentTypeInitializer {
|
|||
PublisherPublicationsStep.class,
|
||||
PublicationGlobalizationUtil.globalize("publisher.ui.publications.title"),
|
||||
PublicationGlobalizationUtil.globalize("publisher.ui.publications.description"),
|
||||
10);
|
||||
config.getPublisherPublicationsStepSortKey());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,13 @@ import com.arsdigita.util.parameter.StringParameter;
|
|||
public class SciDepartmentConfig extends AbstractConfig {
|
||||
|
||||
private final Parameter enableSubDepartmentsStep;
|
||||
private final Parameter subDepartmentsStepSortKey;
|
||||
private final Parameter enableSuperDepartmentsStep;
|
||||
private final Parameter superDepartmentsStepSortKey;
|
||||
private final Parameter enableProjectsStep;
|
||||
private final Parameter projectsStepSortKey;
|
||||
private final Parameter enableProjectDepartmentsStep;
|
||||
private final Parameter projectDepartmentsStepSortKey;
|
||||
private final Parameter shortDescMaxLength;
|
||||
private final Parameter enableDescriptionDhtml;
|
||||
private final Parameter permittedPersonType;
|
||||
|
|
@ -30,24 +34,48 @@ public class SciDepartmentConfig extends AbstractConfig {
|
|||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
subDepartmentsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.scidepartment.subdepartments_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
10);
|
||||
|
||||
enableSuperDepartmentsStep =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.scidepartment.enable.super_departments_step",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
superDepartmentsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.scidepartment.superdepartments_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
20);
|
||||
|
||||
enableProjectsStep =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.scidepartment.enable.projects_step",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
projectsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.scidepartment.projects_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
30);
|
||||
|
||||
enableProjectDepartmentsStep =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.scidepartment.enable.project_departments_step",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
projectDepartmentsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.scidepartment.project_departments_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
40);
|
||||
|
||||
shortDescMaxLength =
|
||||
new IntegerParameter(
|
||||
"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");
|
||||
|
||||
register(enableSubDepartmentsStep);
|
||||
register(subDepartmentsStepSortKey);
|
||||
register(enableSuperDepartmentsStep);
|
||||
register(superDepartmentsStepSortKey);
|
||||
register(enableProjectsStep);
|
||||
register(projectsStepSortKey);
|
||||
register(enableProjectDepartmentsStep);
|
||||
register(projectDepartmentsStepSortKey);
|
||||
register(shortDescMaxLength);
|
||||
register(enableDescriptionDhtml);
|
||||
register(permittedPersonType);
|
||||
|
|
@ -88,18 +120,34 @@ public class SciDepartmentConfig extends AbstractConfig {
|
|||
return (Boolean) get(enableSubDepartmentsStep);
|
||||
}
|
||||
|
||||
public Integer getSubDepartmentsStepSortKey() {
|
||||
return (Integer) get(subDepartmentsStepSortKey);
|
||||
}
|
||||
|
||||
public final Boolean getEnableSuperDepartmentsStep() {
|
||||
return (Boolean) get(enableSuperDepartmentsStep);
|
||||
}
|
||||
|
||||
public Integer getSuperDepartmentsStepSortKey() {
|
||||
return (Integer) get(superDepartmentsStepSortKey);
|
||||
}
|
||||
|
||||
public final Boolean getEnableProjectsStep() {
|
||||
return (Boolean) get(enableProjectsStep);
|
||||
}
|
||||
|
||||
public Integer getProjectsStepSortKey() {
|
||||
return (Integer) get(projectsStepSortKey);
|
||||
}
|
||||
|
||||
public final Boolean getEnableProjectDepartmentsStep() {
|
||||
return (Boolean) get(enableProjectDepartmentsStep);
|
||||
}
|
||||
|
||||
public Integer getProjectDepartmentsStepSortKey() {
|
||||
return (Integer) get(projectDepartmentsStepSortKey);
|
||||
}
|
||||
|
||||
public Integer getShortDescMaxLength() {
|
||||
return (Integer) get(shortDescMaxLength);
|
||||
}
|
||||
|
|
@ -115,4 +163,5 @@ public class SciDepartmentConfig extends AbstractConfig {
|
|||
public final String getTabs() {
|
||||
return (String) get(tabs);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.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.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.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.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.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.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.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.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
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class SciDepartmentInitializer extends ContentTypeInitializer {
|
|||
"scidepartment.ui.subdepartments.title"),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.subdepartments.description"),
|
||||
10);
|
||||
config.getSubDepartmentsStepSortKey());
|
||||
}
|
||||
|
||||
if (config.getEnableSuperDepartmentsStep()) {
|
||||
|
|
@ -82,7 +82,7 @@ public class SciDepartmentInitializer extends ContentTypeInitializer {
|
|||
"scidepartment.ui.superdepartments.title"),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.superdepartments.description"),
|
||||
20);
|
||||
config.getSuperDepartmentsStepSortKey());
|
||||
}
|
||||
|
||||
final ContentTypeCollection contentTypes = ContentType.
|
||||
|
|
@ -100,7 +100,7 @@ public class SciDepartmentInitializer extends ContentTypeInitializer {
|
|||
"scidepartment.ui.projects.title"),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.projects.description"),
|
||||
30);
|
||||
config.getProjectsStepSortKey());
|
||||
}
|
||||
|
||||
if (config.getEnableProjectDepartmentsStep()) {
|
||||
|
|
@ -111,7 +111,7 @@ public class SciDepartmentInitializer extends ContentTypeInitializer {
|
|||
"sciproject.ui.departments.title"),
|
||||
SciDepartmentGlobalizationUtil.globalize(
|
||||
"sciproject.ui.departments.description"),
|
||||
40);
|
||||
config.getProjectDepartmentsStepSortKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,19 +14,31 @@ import com.arsdigita.util.parameter.StringParameter;
|
|||
public class SciInstituteConfig extends AbstractConfig {
|
||||
|
||||
private final Parameter enableDepartmentsStep;
|
||||
private final Parameter departmentsStepSortKey;
|
||||
private final Parameter enableDepartmentInstitutesStep;
|
||||
private final Parameter departmentInstitutesStepSortKey;
|
||||
private final Parameter enableProjectsStep;
|
||||
private final Parameter projectsStepSortKey;
|
||||
private final Parameter enableProjectInstitutesStep;
|
||||
private final Parameter projectInstitutesStepSortKey;
|
||||
private final Parameter shortDescMaxLength;
|
||||
private final Parameter enableDescriptionDhtml;
|
||||
private final Parameter permittedPersonType;
|
||||
private final Parameter tabs;
|
||||
|
||||
public SciInstituteConfig() {
|
||||
|
||||
enableDepartmentsStep =
|
||||
new BooleanParameter(
|
||||
"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 =
|
||||
new BooleanParameter(
|
||||
|
|
@ -34,18 +46,36 @@ public class SciInstituteConfig extends AbstractConfig {
|
|||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
departmentInstitutesStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciinstitute.department_institutes_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
20);
|
||||
|
||||
enableProjectsStep =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciinstitute.enable.projects_step",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
projectsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciinstitute.projects_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
30);
|
||||
|
||||
enableProjectInstitutesStep =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciinstitute.enable.project_institutes_step",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
projectInstitutesStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciinstitute.project_institutes_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
40);
|
||||
|
||||
shortDescMaxLength =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length",
|
||||
|
|
@ -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");
|
||||
|
||||
register(enableDepartmentsStep);
|
||||
register(departmentsStepSortKey);
|
||||
register(enableDepartmentInstitutesStep);
|
||||
register(departmentInstitutesStepSortKey);
|
||||
register(enableProjectsStep);
|
||||
register(projectsStepSortKey);
|
||||
register(enableProjectInstitutesStep);
|
||||
register(projectInstitutesStepSortKey);
|
||||
register(shortDescMaxLength);
|
||||
register(enableDescriptionDhtml);
|
||||
register(permittedPersonType);
|
||||
|
|
@ -84,18 +118,34 @@ public class SciInstituteConfig extends AbstractConfig {
|
|||
return (Boolean) get(enableDepartmentsStep);
|
||||
}
|
||||
|
||||
public final Integer getDepartmentsStepSortKey() {
|
||||
return (Integer) get(departmentsStepSortKey);
|
||||
}
|
||||
|
||||
public final Boolean getEnableDepartmentInstitutesStep() {
|
||||
return (Boolean) get(enableDepartmentInstitutesStep);
|
||||
}
|
||||
|
||||
public final Integer getDepartmentInstitutesStepSortKey() {
|
||||
return (Integer) get(departmentInstitutesStepSortKey);
|
||||
}
|
||||
|
||||
public final Boolean getEnableProjectsStep() {
|
||||
return (Boolean) get(enableProjectsStep);
|
||||
}
|
||||
|
||||
public final Integer getProjectsStepSortKey() {
|
||||
return (Integer) get(projectsStepSortKey);
|
||||
}
|
||||
|
||||
public final Boolean getEnableProjectInstitutesStep() {
|
||||
return (Boolean) get(enableProjectInstitutesStep);
|
||||
}
|
||||
|
||||
public final Integer getProjectInstitutesStepSortKey() {
|
||||
return (Integer) get(projectInstitutesStepSortKey);
|
||||
}
|
||||
|
||||
public Integer getShortDescMaxLength() {
|
||||
return (Integer) get(shortDescMaxLength);
|
||||
}
|
||||
|
|
@ -111,4 +161,5 @@ public class SciInstituteConfig extends AbstractConfig {
|
|||
public final String getTabs() {
|
||||
return (String) get(tabs);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.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.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.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.purpose = Enable projects step?
|
||||
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.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.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.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.purpose = Maximum length for the short description of an institute
|
||||
com.arsdigita.cms.contenttypes.sciinstitute.short_desc.max_length.example = 500
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.ContentType;
|
||||
|
|
@ -64,10 +63,8 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
|
|||
final SciInstituteConfig config = SciInstitute.getConfig();
|
||||
|
||||
//Add the authoring steps for departments if the department type is installed
|
||||
final ContentTypeCollection contentTypes = ContentType.
|
||||
getAllContentTypes();
|
||||
contentTypes.addFilter(
|
||||
"associatedObjectType = 'com.arsdigita.cms.contenttypes.SciDepartment'");
|
||||
final ContentTypeCollection contentTypes = ContentType.getAllContentTypes();
|
||||
contentTypes.addFilter("associatedObjectType = 'com.arsdigita.cms.contenttypes.SciDepartment'");
|
||||
|
||||
if (contentTypes.size() > 0) {
|
||||
if (config.getEnableDepartmentsStep()) {
|
||||
|
|
@ -78,7 +75,7 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
|
|||
"sciinstitute.ui.departments.title"),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.departments.description"),
|
||||
10);
|
||||
config.getDepartmentsStepSortKey());
|
||||
}
|
||||
|
||||
if (config.getEnableDepartmentInstitutesStep()) {
|
||||
|
|
@ -89,15 +86,14 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
|
|||
"scidepartment.ui.institutes.title"),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"scidepartment.ui.institutes.description"),
|
||||
20);
|
||||
config.getDepartmentInstitutesStepSortKey());
|
||||
}
|
||||
}
|
||||
|
||||
contentTypes.reset();
|
||||
|
||||
//Add the authoring steps for projects if the project type is installed
|
||||
contentTypes.addFilter(
|
||||
"associatedObjectType = 'com.arsdigita.cms.contenttypes.SciProject'");
|
||||
contentTypes.addFilter("associatedObjectType = 'com.arsdigita.cms.contenttypes.SciProject'");
|
||||
|
||||
if (contentTypes.size() > 0) {
|
||||
if (config.getEnableProjectsStep()) {
|
||||
|
|
@ -108,7 +104,7 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
|
|||
"sciinstitute.ui.projects.title"),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciinstitute.ui.projects.description"),
|
||||
30);
|
||||
config.getProjectsStepSortKey());
|
||||
}
|
||||
|
||||
if (config.getEnableProjectInstitutesStep()) {
|
||||
|
|
@ -120,7 +116,7 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
|
|||
"sciproject.ui.institutes.title"),
|
||||
SciInstituteGlobalizationUtil.globalize(
|
||||
"sciproject.ui.institutes.description"),
|
||||
40);
|
||||
config.getProjectInstitutesStepSortKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -152,7 +148,7 @@ public class SciInstituteInitializer extends ContentTypeInitializer {
|
|||
*/
|
||||
@Override
|
||||
public String getTraversalXML() {
|
||||
return
|
||||
"/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciInstitute.xml";
|
||||
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciInstitute.xml";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,11 @@ import com.arsdigita.util.parameter.StringParameter;
|
|||
public class SciProjectConfig extends AbstractConfig {
|
||||
|
||||
private final Parameter enableSubProjectsStep;
|
||||
private final Parameter subProjectsStepSortKey;
|
||||
private final Parameter enableSuperProjectsStep;
|
||||
private final Parameter superProjectsStepSortKey;
|
||||
private final Parameter enableInvolvedOrgasStep;
|
||||
private final Parameter involvedOrgasStepSortKey;
|
||||
private final Parameter shortDescMaxLength;
|
||||
private final Parameter enableDescriptionDhtml;
|
||||
private final Parameter enableMembersAllInOne;
|
||||
|
|
@ -36,18 +39,36 @@ public class SciProjectConfig extends AbstractConfig {
|
|||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
subProjectsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciproject.sub_projects_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
10);
|
||||
|
||||
enableSuperProjectsStep =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciproject.enable_super_projects_step",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
superProjectsStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciproject.super_projects_step_sortkey",
|
||||
Parameter.REQUIRED,
|
||||
20);
|
||||
|
||||
enableInvolvedOrgasStep =
|
||||
new BooleanParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciproject.enable_involved_orgas_step",
|
||||
Parameter.REQUIRED,
|
||||
Boolean.TRUE);
|
||||
|
||||
involvedOrgasStepSortKey =
|
||||
new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciproject.involved_orgas_step",
|
||||
Parameter.REQUIRED,
|
||||
30);
|
||||
|
||||
shortDescMaxLength = new IntegerParameter(
|
||||
"com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length",
|
||||
Parameter.REQUIRED,
|
||||
|
|
@ -105,8 +126,11 @@ public class SciProjectConfig extends AbstractConfig {
|
|||
"summary:com.arsdigita.cms.contenttypes.ui.SciProjectSummaryTab;desc:com.arsdigita.cms.contenttypes.ui.SciProjectDescTab");
|
||||
|
||||
register(enableSubProjectsStep);
|
||||
register(subProjectsStepSortKey);
|
||||
register(enableSuperProjectsStep);
|
||||
register(superProjectsStepSortKey);
|
||||
register(enableInvolvedOrgasStep);
|
||||
register(involvedOrgasStepSortKey);
|
||||
register(shortDescMaxLength);
|
||||
register(enableDescriptionDhtml);
|
||||
register(enableMembersAllInOne);
|
||||
|
|
@ -125,14 +149,26 @@ public class SciProjectConfig extends AbstractConfig {
|
|||
return (Boolean) get(enableSubProjectsStep);
|
||||
}
|
||||
|
||||
public final Integer getSubProjectsStepSortKey() {
|
||||
return (Integer) get(subProjectsStepSortKey);
|
||||
}
|
||||
|
||||
public final boolean getEnableSuperProjectsStep() {
|
||||
return (Boolean) get(enableSuperProjectsStep);
|
||||
}
|
||||
|
||||
public final Integer getSuperProjectsStepSortKey() {
|
||||
return (Integer) get(subProjectsStepSortKey);
|
||||
}
|
||||
|
||||
public final boolean getEnableInvolvedOrgasStep() {
|
||||
return (Boolean) get(enableInvolvedOrgasStep);
|
||||
}
|
||||
|
||||
public final Integer getInvolvedOrgasStepSortKey() {
|
||||
return (Integer) get(subProjectsStepSortKey);
|
||||
}
|
||||
|
||||
public final int getShortDescMaxLength() {
|
||||
return (Integer) get(shortDescMaxLength);
|
||||
}
|
||||
|
|
@ -174,4 +210,5 @@ public class SciProjectConfig extends AbstractConfig {
|
|||
public final String getTabs() {
|
||||
return (String) get(tabs);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.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.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.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.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.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.purpose = Maximum length for the short description of a SciProject item in characters.
|
||||
com.arsdigita.cms.contenttypes.sciproject.shortdesc.max_length.example = 500
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class SciProjectInitializer extends ContentTypeInitializer {
|
|||
"sciproject.ui.subprojects.title"),
|
||||
SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.subprojects.description"),
|
||||
10);
|
||||
config.getSubProjectsStepSortKey());
|
||||
}
|
||||
|
||||
if (config.getEnableSuperProjectsStep()) {
|
||||
|
|
@ -84,7 +84,7 @@ public class SciProjectInitializer extends ContentTypeInitializer {
|
|||
"sciproject.ui.superprojects.title"),
|
||||
SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.superprojects.description"),
|
||||
20);
|
||||
config.getSuperProjectsStepSortKey());
|
||||
}
|
||||
|
||||
if (config.getEnableInvolvedOrgasStep()) {
|
||||
|
|
@ -95,7 +95,7 @@ public class SciProjectInitializer extends ContentTypeInitializer {
|
|||
"sciproject.ui.involved_orgas.title"),
|
||||
SciProjectGlobalizationUtil.globalize(
|
||||
"sciproject.ui.involved_orgas.description"),
|
||||
30);
|
||||
config.getInvolvedOrgasStepSortKey());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue