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>
* @version $Revision: #9 $ $Date: 2004/08/17 $
* @version $Id: FormItemLoader.java 755 2005-09-02 13:42:47Z sskracic $
**/
*
*/
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
("com.arsdigita.cms.formbuilder.FormItem.sections",
Parameter.REQUIRED, "");
private final Parameter m_contentSections = new StringParameter("com.arsdigita.cms.formbuilder.FormItem.sections",
Parameter.REQUIRED, "");
{
register(m_contentSections);
loadInfo();
}
private static final String[] TYPES = {
"/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
* Forms should get installed.
* 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
* Overwrites parents class's method to predefine into which content sections Forms should get installed. 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
*/
@Override
public List getContentSections() {
List result = new ArrayList(1);
result.add(get(m_contentSections));
final List result = new ArrayList();
if (!(get(m_contentSections).toString() != null)
&& !get(m_contentSections).toString().isEmpty()) {
result.add(get(m_contentSections));
}
return result;
}
}

View File

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

View File

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