FormItem, FormSectionItem und XMLFeed werden nun beim Load in der ersten ContentSection automatisch aktiviert.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2253 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2013-07-15 10:41:57 +00:00
parent fe1c9c8b5d
commit f86f3a8f79
3 changed files with 41 additions and 41 deletions

View File

@ -31,22 +31,21 @@ import java.util.List;
* @author Rafael H. Schloming <rhs@mit.edu> * @author Rafael H. Schloming <rhs@mit.edu>
* @version $Revision: #9 $ $Date: 2004/08/17 $ * @version $Revision: #9 $ $Date: 2004/08/17 $
* @version $Id: FormItemLoader.java 755 2005-09-02 13:42:47Z sskracic $ * @version $Id: FormItemLoader.java 755 2005-09-02 13:42:47Z sskracic $
**/ *
*/
public class FormItemLoader extends AbstractContentTypeLoader { public class FormItemLoader extends AbstractContentTypeLoader {
/** List of content sections to install Forms. An empty list installs /**
* Forms into the default (first) content section only. * List of content sections to install Forms. An empty list installs Forms into the default (first) content section
* only.
*/ */
private final Parameter m_contentSections = new StringParameter private final Parameter m_contentSections = new StringParameter("com.arsdigita.cms.formbuilder.FormItem.sections",
("com.arsdigita.cms.formbuilder.FormItem.sections", Parameter.REQUIRED, "");
Parameter.REQUIRED, "");
{ {
register(m_contentSections); register(m_contentSections);
loadInfo(); loadInfo();
} }
private static final String[] TYPES = { private static final String[] TYPES = {
"/WEB-INF/content-types/com/arsdigita/cms/formbuilder/FormItem.xml" "/WEB-INF/content-types/com/arsdigita/cms/formbuilder/FormItem.xml"
}; };
@ -56,17 +55,18 @@ public class FormItemLoader extends AbstractContentTypeLoader {
} }
/** /**
* Overwrites parents class's method to predefine into which content sections * Overwrites parents class's method to predefine into which content sections Forms should get installed. An empty
* Forms should get installed. * list (the default parents's implementation) gets Forms installed into the default section only.
* An empty list (the default parents's implementation) gets Forms installed *
* into the default section only. * @return Array of content sections Forms should be installed into
*
* @return Array of content sections Forms should be installed into
*/ */
@Override @Override
public List getContentSections() { public List getContentSections() {
List result = new ArrayList(1); final List result = new ArrayList();
result.add(get(m_contentSections)); if (!(get(m_contentSections).toString() != null)
&& !get(m_contentSections).toString().isEmpty()) {
result.add(get(m_contentSections));
}
return result; return result;
} }
} }

View File

@ -31,20 +31,20 @@ import java.util.List;
* @author Rafael H. Schloming <rhs@mit.edu> * @author Rafael H. Schloming <rhs@mit.edu>
* @version $Revision: #9 $ $Date: 2004/08/17 $ * @version $Revision: #9 $ $Date: 2004/08/17 $
* @version $Id: FormSectionItemLoader.java 755 2005-09-02 13:42:47Z sskracic $ * @version $Id: FormSectionItemLoader.java 755 2005-09-02 13:42:47Z sskracic $
**/ *
*/
public class FormSectionItemLoader extends AbstractContentTypeLoader { public class FormSectionItemLoader extends AbstractContentTypeLoader {
private static final String[] TYPES = { private static final String[] TYPES = {
"/WEB-INF/content-types/com/arsdigita/cms/formbuilder/FormSectionItem.xml" "/WEB-INF/content-types/com/arsdigita/cms/formbuilder/FormSectionItem.xml"
}; };
/**
/** List of content sections to install FormSection. An empty list installs * List of content sections to install FormSection. An empty list installs Forms into the default (first) content
* Forms into the default (first) content section only. * section only.
*/ */
private final Parameter m_contentSections = new StringParameter private final Parameter m_contentSections = new StringParameter(
("com.arsdigita.cms.formbuilder.FormSectionItem.sections", "com.arsdigita.cms.formbuilder.FormSectionItem.sections",
Parameter.REQUIRED, ""); Parameter.REQUIRED, "");
{ {
register(m_contentSections); register(m_contentSections);
@ -56,17 +56,18 @@ public class FormSectionItemLoader extends AbstractContentTypeLoader {
} }
/** /**
* Overwrites parents class's method to predefine into which content sections * Overwrites parents class's method to predefine into which content sections Forms should get installed. An empty
* Forms should get installed. * list (the default parents's implementation) gets Forms installed into the default section only.
* An empty list (the default parents's implementation) gets Forms installed *
* into the default section only. * @return Array of content sections Forms should be installed into
*
* @return Array of content sections Forms should be installed into
*/ */
@Override @Override
public List getContentSections() { public List getContentSections() {
List result = new ArrayList(1); List result = new ArrayList();
result.add(get(m_contentSections)); if (!(get(m_contentSections).toString() != null)
&& !get(m_contentSections).toString().isEmpty()) {
result.add(get(m_contentSections));
}
return result; return result;
} }
} }

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.contenttypes.xmlfeed; package com.arsdigita.cms.contenttypes.xmlfeed;
import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.Parameter;
@ -32,15 +31,13 @@ import java.util.List;
*/ */
public class Loader extends AbstractContentTypeLoader { public class Loader extends AbstractContentTypeLoader {
private final Parameter m_contentSections = new StringParameter private final Parameter m_contentSections = new StringParameter("com.arsdigita.cms.contenttypes.xmlfeed.sections",
("com.arsdigita.cms.contenttypes.xmlfeed.sections", Parameter.REQUIRED, "forms");
Parameter.REQUIRED, "forms");
public Loader() { public Loader() {
register(m_contentSections); register(m_contentSections);
loadInfo(); loadInfo();
} }
private static final String[] TYPES = { private static final String[] TYPES = {
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/XMLFeed.xml" "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/XMLFeed.xml"
}; };
@ -48,11 +45,13 @@ public class Loader extends AbstractContentTypeLoader {
public String[] getTypes() { public String[] getTypes() {
return TYPES; return TYPES;
} }
public List getContentSections() { public List getContentSections() {
List result = new ArrayList(1); List result = new ArrayList();
result.add(get(m_contentSections)); if (!(get(m_contentSections).toString() != null)
&& !get(m_contentSections).toString().isEmpty()) {
result.add(get(m_contentSections));
}
return result; return result;
} }
} }