Umbenennen ccm-ldn-subsite und erste Schritte Funktionserweiterung Konfiguration Subsite Eingangsseite.
git-svn-id: https://svn.libreccm.org/ccm/trunk@1328 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
4b8b30bf80
commit
d4dbe95668
|
|
@ -1,19 +0,0 @@
|
||||||
|
|
||||||
<!-- module ccm-ldn-subsite - servlet declarations BEGIN -->
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>subsite-files</servlet-name>
|
|
||||||
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
|
|
||||||
<init-param>
|
|
||||||
<param-name>template-path</param-name>
|
|
||||||
<param-value>/templates/ccm-ldn-subsite</param-value>
|
|
||||||
</init-param>
|
|
||||||
</servlet>
|
|
||||||
<!-- module ccm-ldn-subsite - servlet declarations END -->
|
|
||||||
|
|
||||||
<!-- module ccm-ldn-subsite - servlet mappings BEGIN -->
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>subsite-files</servlet-name>
|
|
||||||
<url-pattern>/ccm-ldn-subsite/files/*</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
<!-- module ccm-ldn-subsite - servlet mappings END -->
|
|
||||||
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<registry>
|
|
||||||
<config class="com.arsdigita.london.subsite.SubsiteConfig"
|
|
||||||
storage="ccm-ldn-subsite/subsite.properties"/>
|
|
||||||
</registry>
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
com.arsdigita.london.subsite.traversal_adapters.title=XML renderer rules
|
|
||||||
com.arsdigita.london.subsite.traversal_adapters.purpose=Name of file with rules for configuring information in generated XML
|
|
||||||
com.arsdigita.london.subsite.traversal_adapters.format=[string]
|
|
||||||
com.arsdigita.london.subsite.traversal_adapters.example=/WEB-INF/resources/subsite-adapters.xml
|
|
||||||
|
|
||||||
com.arsdigita.london.subsite.front_page_application.title=Front Page Application (Subsite)
|
|
||||||
com.arsdigita.london.subsite.front_page_application.purpose=The Application to use as the front (home) page for a subsite
|
|
||||||
com.arsdigita.london.subsite.front_page_application.format=[classname]
|
|
||||||
com.arsdigita.london.subsite.front_page_application.example=com.arsdigita.london.portal.Workspace
|
|
||||||
|
|
||||||
com.arsdigita.london.subsite.front_page_parent_url.title=Front Page Parent URL (Subsite)
|
|
||||||
com.arsdigita.london.subsite.front_page_parent_url.purpose=The url that is used as the parent for all subsites.
|
|
||||||
com.arsdigita.london.subsite.front_page_parent_url.format=[string]
|
|
||||||
com.arsdigita.london.subsite.front_page_parent_url.example=/portal/
|
|
||||||
|
|
||||||
com.arsdigita.london.subsite.root_category_picker.title=Class for picking root categories
|
|
||||||
com.arsdigita.london.subsite.root_category_picker.purpose=The UI class for picking root categories
|
|
||||||
com.arsdigita.london.subsite.root_category_picker.format=[class]
|
|
||||||
com.arsdigita.london.subsite.root_category_picker.example=com.arsdigita.london.util.ui.ApplicationCategoryPicker
|
|
||||||
|
|
@ -42,6 +42,7 @@ import java.util.StringTokenizer;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader.
|
* Loader.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,10 @@ import org.apache.log4j.Logger;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class Template extends DomainObject {
|
public class Template extends DomainObject {
|
||||||
private static final Logger s_log = Logger.getLogger(Template.class);
|
private static final Logger s_log = Logger.getLogger(Template.class);
|
||||||
|
|
||||||
|
|
@ -58,6 +62,9 @@ public class Template extends DomainObject {
|
||||||
private static final String TEMPLATES_FOR_CATEGORY =
|
private static final String TEMPLATES_FOR_CATEGORY =
|
||||||
"com.arsdigita.navigation.getTemplatesForCategory";
|
"com.arsdigita.navigation.getTemplatesForCategory";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
protected Template() {
|
protected Template() {
|
||||||
this(BASE_DATA_OBJECT_TYPE);
|
this(BASE_DATA_OBJECT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
@ -71,6 +78,9 @@ public class Template extends DomainObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
super.initialize();
|
super.initialize();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,12 @@ import com.arsdigita.london.util.Transaction;
|
||||||
|
|
||||||
import org.apache.commons.cli.CommandLine;
|
import org.apache.commons.cli.CommandLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maintenance CLI procedure to insert additional jsp templates (used in
|
||||||
|
* navigation/admin) which determine how to display the index page for each
|
||||||
|
* node of the navigation tree.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class TemplateCreator extends Program {
|
public class TemplateCreator extends Program {
|
||||||
public TemplateCreator() {
|
public TemplateCreator() {
|
||||||
super( "Navigation Create Category Template",
|
super( "Navigation Create Category Template",
|
||||||
|
|
@ -51,6 +57,10 @@ public class TemplateCreator extends Program {
|
||||||
txn.run();
|
txn.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param args
|
||||||
|
*/
|
||||||
public static void main( String[] args ) {
|
public static void main( String[] args ) {
|
||||||
new TemplateCreator().run( args );
|
new TemplateCreator().run( args );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<ccm:dependencies>
|
<ccm:dependencies>
|
||||||
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
||||||
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
||||||
<ccm:requires name="ccm-ldn-subsite" version="6.6.0" relation="ge"/>
|
<ccm:requires name="ccm-subsite" version="6.6.0" relation="ge"/>
|
||||||
<ccm:requires name="ccm-ldn-util" version="6.6.0" relation="ge"/>
|
<ccm:requires name="ccm-ldn-util" version="6.6.0" relation="ge"/>
|
||||||
</ccm:dependencies>
|
</ccm:dependencies>
|
||||||
<ccm:contacts>
|
<ccm:contacts>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
||||||
import com.arsdigita.kernel.permissions.PermissionService;
|
import com.arsdigita.kernel.permissions.PermissionService;
|
||||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||||
import com.arsdigita.portalworkspace.Workspace;
|
import com.arsdigita.portalworkspace.Workspace;
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
import com.arsdigita.persistence.Filter;
|
import com.arsdigita.persistence.Filter;
|
||||||
import com.arsdigita.portal.PortletType;
|
import com.arsdigita.portal.PortletType;
|
||||||
import com.arsdigita.portal.PortletTypeCollection;
|
import com.arsdigita.portal.PortletTypeCollection;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||||
name="ccm-ldn-subsite"
|
name="ccm-subsite"
|
||||||
prettyName="Subsite"
|
prettyName="Subsite"
|
||||||
version="6.6.0"
|
version="6.6.0"
|
||||||
release="1"
|
release="1"
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
<!-- module ccm-subsite - servlet declarations BEGIN -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>subsite-files</servlet-name>
|
||||||
|
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>template-path</param-name>
|
||||||
|
<param-value>/templates/ccm-subsite</param-value>
|
||||||
|
</init-param>
|
||||||
|
</servlet>
|
||||||
|
<!-- module ccm-subsite - servlet declarations END -->
|
||||||
|
|
||||||
|
<!-- module ccm-subsite - servlet mappings BEGIN -->
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>subsite-files</servlet-name>
|
||||||
|
<url-pattern>/ccm-subsite/files/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
<!-- module ccm-subsite - servlet mappings END -->
|
||||||
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
// 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
|
||||||
|
|
||||||
model com.arsdigita.london.subsite;
|
model com.arsdigita.subsite;
|
||||||
|
|
||||||
import com.arsdigita.kernel.ACSObject;
|
import com.arsdigita.kernel.ACSObject;
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
// 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
|
||||||
|
|
||||||
model com.arsdigita.london.subsite;
|
model com.arsdigita.subsite;
|
||||||
|
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
|
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
|
||||||
|
|
||||||
<xrd:context name="com.arsdigita.london.subsite.ui.SiteListing">
|
<xrd:context name="com.arsdigita.subsite.ui.SiteListing">
|
||||||
<xrd:adapter objectType="com.arsdigita.london.subsite.Site">
|
<xrd:adapter objectType="com.arsdigita.subsite.Site">
|
||||||
<xrd:associations rule="include">
|
<xrd:associations rule="include">
|
||||||
<xrd:property name="/object/frontPage"/>
|
<xrd:property name="/object/frontPage"/>
|
||||||
</xrd:associations>
|
</xrd:associations>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<registry>
|
||||||
|
<config class="com.arsdigita.subsite.SubsiteConfig"
|
||||||
|
storage="ccm-subsite/subsite.properties"/>
|
||||||
|
</registry>
|
||||||
|
|
@ -12,10 +12,10 @@
|
||||||
<!--
|
<!--
|
||||||
<table name=""/>
|
<table name=""/>
|
||||||
-->
|
-->
|
||||||
<initializer class="com.arsdigita.london.subsite.Initializer"/>
|
<initializer class="com.arsdigita.subsite.Initializer"/>
|
||||||
</provides>
|
</provides>
|
||||||
<scripts>
|
<scripts>
|
||||||
<schema directory="ccm-ldn-subsite"/>
|
<schema directory="ccm-subsite"/>
|
||||||
<data class="com.arsdigita.london.subsite.Loader"/>
|
<data class="com.arsdigita.subsite.Loader"/>
|
||||||
</scripts>
|
</scripts>
|
||||||
</load>
|
</load>
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
* 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.london.subsite;
|
package com.arsdigita.subsite;
|
||||||
|
|
||||||
import com.arsdigita.db.DbHelper;
|
import com.arsdigita.db.DbHelper;
|
||||||
|
|
||||||
|
|
@ -25,7 +25,6 @@ import com.arsdigita.domain.DomainObject;
|
||||||
|
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
import com.arsdigita.kernel.ACSObjectInstantiator;
|
||||||
|
|
||||||
// import com.arsdigita.persistence.pdl.ManifestSource;
|
|
||||||
import com.arsdigita.persistence.pdl.NameFilter;
|
import com.arsdigita.persistence.pdl.NameFilter;
|
||||||
import com.arsdigita.persistence.pdl.ManifestSource;
|
import com.arsdigita.persistence.pdl.ManifestSource;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
|
|
@ -33,7 +32,6 @@ import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.runtime.RuntimeConfig;
|
import com.arsdigita.runtime.RuntimeConfig;
|
||||||
import com.arsdigita.runtime.PDLInitializer;
|
import com.arsdigita.runtime.PDLInitializer;
|
||||||
import com.arsdigita.runtime.CompoundInitializer;
|
import com.arsdigita.runtime.CompoundInitializer;
|
||||||
// import com.arsdigita.runtime.LegacyInitEvent;
|
|
||||||
import com.arsdigita.runtime.DomainInitEvent;
|
import com.arsdigita.runtime.DomainInitEvent;
|
||||||
|
|
||||||
import com.arsdigita.templating.PatternStylesheetResolver;
|
import com.arsdigita.templating.PatternStylesheetResolver;
|
||||||
|
|
@ -52,7 +50,7 @@ public class Initializer extends CompoundInitializer {
|
||||||
|
|
||||||
add(new PDLInitializer
|
add(new PDLInitializer
|
||||||
(new ManifestSource
|
(new ManifestSource
|
||||||
("ccm-ldn-subsite.pdl.mf",
|
("ccm-subsite.pdl.mf",
|
||||||
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
* 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.london.subsite;
|
package com.arsdigita.subsite;
|
||||||
|
|
||||||
import com.arsdigita.loader.PackageLoader;
|
import com.arsdigita.loader.PackageLoader;
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
* 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.london.subsite;
|
package com.arsdigita.subsite;
|
||||||
|
|
||||||
import com.arsdigita.categorization.Category;
|
import com.arsdigita.categorization.Category;
|
||||||
import com.arsdigita.cms.TemplateContext;
|
import com.arsdigita.cms.TemplateContext;
|
||||||
|
|
@ -39,7 +39,7 @@ import java.math.BigDecimal;
|
||||||
public class Site extends ACSObject {
|
public class Site extends ACSObject {
|
||||||
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.london.subsite.Site";
|
"com.arsdigita.subsite.Site";
|
||||||
|
|
||||||
public static final String TITLE = "title";
|
public static final String TITLE = "title";
|
||||||
public static final String DESCRIPTION = "description";
|
public static final String DESCRIPTION = "description";
|
||||||
|
|
@ -112,6 +112,7 @@ public class Site extends ACSObject {
|
||||||
Category.setRootForObject(this, root);
|
Category.setRootForObject(this, root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void beforeSave() {
|
public void beforeSave() {
|
||||||
super.beforeSave();
|
super.beforeSave();
|
||||||
|
|
||||||
|
|
@ -121,6 +122,7 @@ public class Site extends ACSObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void beforeDelete() {
|
public void beforeDelete() {
|
||||||
super.beforeDelete();
|
super.beforeDelete();
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
* 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.london.subsite;
|
package com.arsdigita.subsite;
|
||||||
|
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
|
|
@ -34,9 +34,9 @@ public class Subsite extends Application {
|
||||||
private static final Logger s_log = Logger.getLogger(Subsite.class);
|
private static final Logger s_log = Logger.getLogger(Subsite.class);
|
||||||
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE
|
public static final String BASE_DATA_OBJECT_TYPE
|
||||||
= "com.arsdigita.london.subsite.Subsite";
|
= "com.arsdigita.subsite.Subsite";
|
||||||
public static final String SUBSITE_XML_NS
|
public static final String SUBSITE_XML_NS
|
||||||
= "http://ccm.redhat.com/london/subsite/1.0";
|
= "http://ccm.redhat.com/subsite/1.0";
|
||||||
public static final String SUBSITE_XML_PREFIX
|
public static final String SUBSITE_XML_PREFIX
|
||||||
= "subsite:";
|
= "subsite:";
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@ public class Subsite extends Application {
|
||||||
*/
|
*/
|
||||||
public String getServletPath() {
|
public String getServletPath() {
|
||||||
// return "/files";
|
// return "/files";
|
||||||
return "/ccm-ldn-subsite/files";
|
return "/ccm-subsite/files";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
* 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.london.subsite;
|
package com.arsdigita.subsite;
|
||||||
|
|
||||||
import com.arsdigita.runtime.AbstractConfig;
|
import com.arsdigita.runtime.AbstractConfig;
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ import com.arsdigita.util.parameter.StringParameter;
|
||||||
// import com.arsdigita.util.UncheckedWrapperException;
|
// import com.arsdigita.util.UncheckedWrapperException;
|
||||||
import com.arsdigita.london.util.ui.ApplicationCategoryPicker;
|
import com.arsdigita.london.util.ui.ApplicationCategoryPicker;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.IOException;
|
// import java.io.IOException;
|
||||||
// import java.net.URL;
|
// import java.net.URL;
|
||||||
// import java.net.MalformedURLException;
|
// import java.net.MalformedURLException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -42,32 +42,46 @@ public class SubsiteConfig extends AbstractConfig {
|
||||||
|
|
||||||
private Map m_themes = new HashMap();
|
private Map m_themes = new HashMap();
|
||||||
|
|
||||||
private ResourceParameter m_adapters;
|
/**
|
||||||
private StringParameter m_frontPageApplicationTypeParameter;
|
*
|
||||||
private StringParameter m_frontPageParentURLParameter;
|
*/
|
||||||
private Parameter m_rootCategoryPicker;
|
private Parameter m_adapters = new
|
||||||
|
ResourceParameter("com.arsdigita.subsite.traversal_adapters",
|
||||||
|
Parameter.REQUIRED,
|
||||||
|
"/WEB-INF/resources/subsite-adapters.xml");
|
||||||
|
|
||||||
|
/** Class name of application type which should be used for front page
|
||||||
|
* of all created subsites.
|
||||||
|
* It is not possible to use different front page appöications for
|
||||||
|
* different subsites.
|
||||||
|
*/
|
||||||
|
private Parameter m_frontPageApplicationTypeParameter= new
|
||||||
|
StringParameter("com.arsdigita.subsite.front_page_application",
|
||||||
|
Parameter.REQUIRED,
|
||||||
|
"com.arsdigita.portalworkspace.Workspace");
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Parameter m_frontPageParentURLParameter = new
|
||||||
|
StringParameter("com.arsdigita.subsite.front_page_parent_url",
|
||||||
|
Parameter.REQUIRED,
|
||||||
|
"/portal/");
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Parameter m_rootCategoryPicker = new
|
||||||
|
ClassParameter("com.arsdigita.subsite.root_category_picker",
|
||||||
|
Parameter.REQUIRED,
|
||||||
|
ApplicationCategoryPicker.class);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
public SubsiteConfig() {
|
public SubsiteConfig() {
|
||||||
|
|
||||||
m_adapters = new ResourceParameter
|
|
||||||
("com.arsdigita.london.subsite.traversal_adapters",
|
|
||||||
Parameter.REQUIRED,
|
|
||||||
"/WEB-INF/resources/subsite-adapters.xml");
|
|
||||||
|
|
||||||
m_frontPageApplicationTypeParameter = new StringParameter
|
|
||||||
("com.arsdigita.london.subsite.front_page_application",
|
|
||||||
Parameter.REQUIRED,
|
|
||||||
"com.arsdigita.london.portal.Workspace");
|
|
||||||
|
|
||||||
m_frontPageParentURLParameter = new StringParameter
|
|
||||||
("com.arsdigita.london.subsite.front_page_parent_url",
|
|
||||||
Parameter.REQUIRED,
|
|
||||||
"/portal/");
|
|
||||||
m_rootCategoryPicker = new ClassParameter(
|
|
||||||
"com.arsdigita.london.subsite.root_category_picker",
|
|
||||||
Parameter.REQUIRED,
|
|
||||||
ApplicationCategoryPicker.class);
|
|
||||||
|
|
||||||
register(m_adapters);
|
register(m_adapters);
|
||||||
register(m_frontPageApplicationTypeParameter);
|
register(m_frontPageApplicationTypeParameter);
|
||||||
register(m_frontPageParentURLParameter);
|
register(m_frontPageParentURLParameter);
|
||||||
|
|
@ -80,6 +94,10 @@ public class SubsiteConfig extends AbstractConfig {
|
||||||
return (InputStream) get(m_adapters);
|
return (InputStream) get(m_adapters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getFrontPageApplicationType() {
|
public String getFrontPageApplicationType() {
|
||||||
return (String)get(m_frontPageApplicationTypeParameter);
|
return (String)get(m_frontPageApplicationTypeParameter);
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
com.arsdigita.subsite.traversal_adapters.title=XML renderer rules
|
||||||
|
com.arsdigita.subsite.traversal_adapters.purpose=Name of file with rules for configuring information in generated XML
|
||||||
|
com.arsdigita.subsite.traversal_adapters.format=[string]
|
||||||
|
com.arsdigita.subsite.traversal_adapters.example=/WEB-INF/resources/subsite-adapters.xml
|
||||||
|
|
||||||
|
com.arsdigita.subsite.front_page_application.title=Front Page Application (Subsite)
|
||||||
|
com.arsdigita.subsite.front_page_application.purpose=The Application to use as the front (home) page for a subsite
|
||||||
|
com.arsdigita.subsite.front_page_application.format=[classname]
|
||||||
|
com.arsdigita.subsite.front_page_application.example=com.arsdigita.portalworkspace.Workspace
|
||||||
|
|
||||||
|
com.arsdigita.subsite.front_page_parent_url.title=Front Page Parent URL (Subsite)
|
||||||
|
com.arsdigita.subsite.front_page_parent_url.purpose=The url that is used as the parent for all subsites.
|
||||||
|
com.arsdigita.subsite.front_page_parent_url.format=[string]
|
||||||
|
com.arsdigita.subsite.front_page_parent_url.example=/portal/
|
||||||
|
|
||||||
|
com.arsdigita.subsite.root_category_picker.title=Class for picking root categories
|
||||||
|
com.arsdigita.subsite.root_category_picker.purpose=The UI class for picking root categories
|
||||||
|
com.arsdigita.subsite.root_category_picker.format=[class]
|
||||||
|
com.arsdigita.subsite.root_category_picker.example=com.arsdigita.london.util.ui.ApplicationCategoryPicker
|
||||||
|
|
@ -16,14 +16,14 @@
|
||||||
* 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.london.subsite;
|
package com.arsdigita.subsite;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import com.arsdigita.util.Assert;
|
|
||||||
import com.arsdigita.dispatcher.DispatcherHelper;
|
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||||
|
import com.arsdigita.util.Assert;
|
||||||
|
// import com.arsdigita.subsite.Site;
|
||||||
|
|
||||||
import com.arsdigita.london.subsite.Site;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The entry point into all the global state that CCM Subsite code expects to
|
* <p>The entry point into all the global state that CCM Subsite code expects to
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
* 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.london.subsite;
|
package com.arsdigita.subsite;
|
||||||
|
|
||||||
import com.arsdigita.util.servlet.HttpHost;
|
// import com.arsdigita.subsite.Subsite;
|
||||||
|
// import com.arsdigita.util.servlet.HttpHost;
|
||||||
import com.arsdigita.web.ServerDynamicHostProvider;
|
import com.arsdigita.web.ServerDynamicHostProvider;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
@ -34,6 +35,7 @@ public class SubsiteDynamicHostProvider extends ServerDynamicHostProvider {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (!Subsite.getContext().hasSite()) {
|
if (!Subsite.getContext().hasSite()) {
|
||||||
return super.getName();
|
return super.getName();
|
||||||
|
|
@ -43,6 +45,7 @@ public class SubsiteDynamicHostProvider extends ServerDynamicHostProvider {
|
||||||
return url.getHost();
|
return url.getHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getPort() {
|
public int getPort() {
|
||||||
if (!Subsite.getContext().hasSite()) {
|
if (!Subsite.getContext().hasSite()) {
|
||||||
return super.getPort();
|
return super.getPort();
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
* 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.london.subsite;
|
package com.arsdigita.subsite;
|
||||||
|
|
||||||
|
|
||||||
|
// import com.arsdigita.subsite.Site;
|
||||||
import javax.servlet.FilterChain;
|
import javax.servlet.FilterChain;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
|
|
@ -59,6 +60,7 @@ public class SubsiteFilter extends BaseFilter {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws ServletException
|
* @throws ServletException
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void doService(HttpServletRequest sreq,
|
protected void doService(HttpServletRequest sreq,
|
||||||
HttpServletResponse sresp,
|
HttpServletResponse sresp,
|
||||||
FilterChain chain)
|
FilterChain chain)
|
||||||
|
|
@ -16,10 +16,11 @@
|
||||||
* 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.london.subsite;
|
package com.arsdigita.subsite;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
// import com.arsdigita.subsite.Subsite;
|
||||||
import com.arsdigita.templating.PatternGenerator;
|
import com.arsdigita.templating.PatternGenerator;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
public class SubsitePatternGenerator implements PatternGenerator {
|
public class SubsitePatternGenerator implements PatternGenerator {
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
* 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.london.subsite.dispatcher;
|
package com.arsdigita.subsite.dispatcher;
|
||||||
|
|
||||||
import com.arsdigita.cms.Folder;
|
import com.arsdigita.cms.Folder;
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
|
|
@ -25,8 +25,8 @@ import com.arsdigita.cms.TemplateManager;
|
||||||
import com.arsdigita.cms.dispatcher.DefaultTemplateResolver;
|
import com.arsdigita.cms.dispatcher.DefaultTemplateResolver;
|
||||||
import com.arsdigita.util.ResourceManager;
|
import com.arsdigita.util.ResourceManager;
|
||||||
|
|
||||||
import com.arsdigita.london.subsite.Site;
|
import com.arsdigita.subsite.Site;
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
To change this template, choose Tools | Templates
|
To change this template, choose Tools | Templates
|
||||||
and open the template in the editor.
|
and open the template in the editor.
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Package com.arsdigita.london.subsite</title>
|
<title>Package com.arsdigita.london.subsite</title>
|
||||||
|
|
@ -15,7 +15,7 @@ and open the template in the editor.
|
||||||
<pre>
|
<pre>
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<filter-class>com.arsdigita.london.subsite.SubsiteFilter</filter-class>
|
<filter-class>com.arsdigita.subsite.SubsiteFilter</filter-class>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
@ -16,9 +16,9 @@
|
||||||
* 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.london.subsite.ui;
|
package com.arsdigita.subsite.ui;
|
||||||
|
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
import com.arsdigita.bebop.SimpleContainer;
|
import com.arsdigita.bebop.SimpleContainer;
|
||||||
|
|
||||||
public class ControlCenterPanel extends SimpleContainer {
|
public class ControlCenterPanel extends SimpleContainer {
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
* 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.london.subsite.ui;
|
package com.arsdigita.subsite.ui;
|
||||||
|
|
||||||
import com.arsdigita.london.subsite.Site;
|
import com.arsdigita.subsite.Site;
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
import com.arsdigita.london.util.ui.CategoryPicker;
|
import com.arsdigita.london.util.ui.CategoryPicker;
|
||||||
import com.arsdigita.categorization.Category;
|
import com.arsdigita.categorization.Category;
|
||||||
import com.arsdigita.util.StringUtils;
|
import com.arsdigita.util.StringUtils;
|
||||||
|
|
@ -64,23 +64,27 @@ public class SiteForm extends Form {
|
||||||
private SiteSelectionModel m_site;
|
private SiteSelectionModel m_site;
|
||||||
|
|
||||||
private TextField m_title;
|
private TextField m_title;
|
||||||
|
private TextField m_hostname;
|
||||||
private TextArea m_description;
|
private TextArea m_description;
|
||||||
private RadioGroup m_customHomepage;
|
private RadioGroup m_customHomepage;
|
||||||
private TextField m_hostname;
|
private TextField m_customHomepage_url;
|
||||||
private TextField m_styleDir;
|
private TextField m_styleDir;
|
||||||
private CategoryPicker m_rootCategory;
|
private CategoryPicker m_rootCategory;
|
||||||
private SingleSelect m_themes;
|
private SingleSelect m_themes;
|
||||||
private SaveCancelSection m_buttons;
|
private SaveCancelSection m_buttons;
|
||||||
|
|
||||||
private final static String DEFAULT_STYLE = "DEFAULT_STYLE";
|
private final static String DEFAULT_STYLE = "DEFAULT_STYLE";
|
||||||
private final static String DEFAULT_STYLE_LABEL =
|
private final static String DEFAULT_STYLE_LABEL = "Site Wide Default";
|
||||||
"Site Wide Default";
|
|
||||||
private final static String OTHER_STYLE = "OTHER_STYLE";
|
private final static String OTHER_STYLE = "OTHER_STYLE";
|
||||||
private final static String OTHER_STYLE_LABEL =
|
private final static String OTHER_STYLE_LABEL = "Other (type in box below)";
|
||||||
"Other (type in box below)";
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* @param site
|
||||||
|
*/
|
||||||
|
public SiteForm(String name, SiteSelectionModel site) {
|
||||||
|
|
||||||
public SiteForm(String name,
|
|
||||||
SiteSelectionModel site) {
|
|
||||||
super(name, new SimpleContainer());
|
super(name, new SimpleContainer());
|
||||||
setClassAttr("simpleForm");
|
setClassAttr("simpleForm");
|
||||||
setRedirecting(true);
|
setRedirecting(true);
|
||||||
|
|
@ -94,6 +98,17 @@ public class SiteForm extends Form {
|
||||||
m_title.setSize(40);
|
m_title.setSize(40);
|
||||||
add(m_title);
|
add(m_title);
|
||||||
|
|
||||||
|
/* Setup text input field for hostname */
|
||||||
|
m_hostname = new TextField(new StringParameter("hostname"));
|
||||||
|
m_hostname.addValidationListener(new NotNullValidationListener());
|
||||||
|
m_hostname.addValidationListener(new HostNameValidationListener());
|
||||||
|
m_hostname.setMetaDataAttribute("title", "Hostname");
|
||||||
|
m_hostname.setSize(35);
|
||||||
|
m_hostname.setHint(
|
||||||
|
"Enter the hostname for the subsite, eg business.example.com"
|
||||||
|
);
|
||||||
|
add(m_hostname); // adds hostname input field to form
|
||||||
|
|
||||||
m_description = new TextArea(new StringParameter("description"));
|
m_description = new TextArea(new StringParameter("description"));
|
||||||
m_description.addValidationListener(new NotNullValidationListener());
|
m_description.addValidationListener(new NotNullValidationListener());
|
||||||
m_description.setMetaDataAttribute("title", "Description");
|
m_description.setMetaDataAttribute("title", "Description");
|
||||||
|
|
@ -104,11 +119,12 @@ public class SiteForm extends Form {
|
||||||
);
|
);
|
||||||
add(m_description);
|
add(m_description);
|
||||||
|
|
||||||
|
/* Setup Radio selection group for subsite start page (front page) */
|
||||||
m_customHomepage = new RadioGroup("customHome");
|
m_customHomepage = new RadioGroup("customHome");
|
||||||
m_customHomepage.addOption(new Option(Boolean.TRUE.toString(),
|
|
||||||
"Create custom homepage"));
|
|
||||||
m_customHomepage.addOption(new Option(Boolean.FALSE.toString(),
|
m_customHomepage.addOption(new Option(Boolean.FALSE.toString(),
|
||||||
"Use main site homepage"));
|
"Use main site homepage"));
|
||||||
|
m_customHomepage.addOption(new Option(Boolean.TRUE.toString(),
|
||||||
|
"Create custom homepage"));
|
||||||
m_customHomepage.addValidationListener(new NotNullValidationListener());
|
m_customHomepage.addValidationListener(new NotNullValidationListener());
|
||||||
m_customHomepage.setHint(
|
m_customHomepage.setHint(
|
||||||
"Select to create a custom homepage for the subsite"
|
"Select to create a custom homepage for the subsite"
|
||||||
|
|
@ -125,18 +141,20 @@ public class SiteForm extends Form {
|
||||||
} catch (TooManyListenersException ex) {
|
} catch (TooManyListenersException ex) {
|
||||||
throw new UncheckedWrapperException("cannot happen", ex);
|
throw new UncheckedWrapperException("cannot happen", ex);
|
||||||
}
|
}
|
||||||
add(m_customHomepage);
|
add(m_customHomepage); // adds Radio group start page to form
|
||||||
|
|
||||||
m_hostname = new TextField(new StringParameter("hostname"));
|
m_customHomepage_url = new TextField(
|
||||||
m_hostname.addValidationListener(new NotNullValidationListener());
|
new StringParameter("customHomepage_url"));
|
||||||
m_hostname.addValidationListener(new HostNameValidationListener());
|
m_customHomepage_url.setMetaDataAttribute("title",
|
||||||
m_hostname.setMetaDataAttribute("title", "Hostname");
|
"Front Page name (url)");
|
||||||
m_title.setSize(40);
|
m_customHomepage_url.setSize(40);
|
||||||
m_hostname.setHint(
|
m_customHomepage_url.setHint(
|
||||||
"Enter the hostname for the subsite, eg business.example.com"
|
"Enter the name of the custom homepage, i.e. the last part of url. " +
|
||||||
|
" "
|
||||||
);
|
);
|
||||||
add(m_hostname);
|
add(m_customHomepage_url); // adds inputfield start page to form
|
||||||
|
|
||||||
|
/* Setup selection box for themes */
|
||||||
m_themes = new SingleSelect(new StringParameter("selectStyleDir"));
|
m_themes = new SingleSelect(new StringParameter("selectStyleDir"));
|
||||||
m_themes.setMetaDataAttribute("title", "XSLT Directory");
|
m_themes.setMetaDataAttribute("title", "XSLT Directory");
|
||||||
m_themes.setHint("Select an existing theme from the list, " +
|
m_themes.setHint("Select an existing theme from the list, " +
|
||||||
|
|
@ -148,11 +166,11 @@ public class SiteForm extends Form {
|
||||||
} catch (TooManyListenersException ex) {
|
} catch (TooManyListenersException ex) {
|
||||||
throw new UncheckedWrapperException("This cannot happen", ex);
|
throw new UncheckedWrapperException("This cannot happen", ex);
|
||||||
}
|
}
|
||||||
add(m_themes);
|
add(m_themes); // adds themes selection box to form
|
||||||
|
|
||||||
m_styleDir = new TextField(new StringParameter("styleDir"));
|
m_styleDir = new TextField(new StringParameter("styleDir"));
|
||||||
m_styleDir.setMetaDataAttribute("title", "XSLT Directory (Other)");
|
m_styleDir.setMetaDataAttribute("title", "XSLT Directory (Other)");
|
||||||
m_title.setSize(40);
|
m_styleDir.setSize(40);
|
||||||
m_styleDir.setHint(
|
m_styleDir.setHint(
|
||||||
"Enter the directory for the custom XSLT styles, " +
|
"Enter the directory for the custom XSLT styles, " +
|
||||||
"or leave blank for the default styling"
|
"or leave blank for the default styling"
|
||||||
|
|
@ -182,6 +200,9 @@ public class SiteForm extends Form {
|
||||||
addValidationListener(new SiteValidationListener());
|
addValidationListener(new SiteValidationListener());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
private class SiteSubmissionListener implements FormSubmissionListener {
|
private class SiteSubmissionListener implements FormSubmissionListener {
|
||||||
public void submitted(FormSectionEvent e)
|
public void submitted(FormSectionEvent e)
|
||||||
throws FormProcessException {
|
throws FormProcessException {
|
||||||
|
|
@ -194,6 +215,9 @@ public class SiteForm extends Form {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
private class SiteValidationListener implements FormValidationListener {
|
private class SiteValidationListener implements FormValidationListener {
|
||||||
public void validate(FormSectionEvent e) {
|
public void validate(FormSectionEvent e) {
|
||||||
PageState state = e.getPageState();
|
PageState state = e.getPageState();
|
||||||
|
|
@ -229,6 +253,9 @@ public class SiteForm extends Form {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
private class HostNameValidationListener implements ParameterListener {
|
private class HostNameValidationListener implements ParameterListener {
|
||||||
public void validate(ParameterEvent e) {
|
public void validate(ParameterEvent e) {
|
||||||
ParameterData data = e.getParameterData();
|
ParameterData data = e.getParameterData();
|
||||||
|
|
@ -253,12 +280,16 @@ public class SiteForm extends Form {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
private class SiteInitListener implements FormInitListener {
|
private class SiteInitListener implements FormInitListener {
|
||||||
public void init(FormSectionEvent e)
|
public void init(FormSectionEvent e)
|
||||||
throws FormProcessException {
|
throws FormProcessException {
|
||||||
PageState state = e.getPageState();
|
PageState state = e.getPageState();
|
||||||
|
|
||||||
Site site = m_site.getSelectedSite(state);
|
Site site = m_site.getSelectedSite(state);
|
||||||
|
|
||||||
if (site == null) {
|
if (site == null) {
|
||||||
m_title.setValue(state, null);
|
m_title.setValue(state, null);
|
||||||
m_description.setValue(state, null);
|
m_description.setValue(state, null);
|
||||||
|
|
@ -306,6 +337,9 @@ public class SiteForm extends Form {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
private class SiteProcessListener implements FormProcessListener {
|
private class SiteProcessListener implements FormProcessListener {
|
||||||
public void process(FormSectionEvent e)
|
public void process(FormSectionEvent e)
|
||||||
throws FormProcessException {
|
throws FormProcessException {
|
||||||
|
|
@ -325,47 +359,58 @@ public class SiteForm extends Form {
|
||||||
styleDir = theme;
|
styleDir = theme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (site == null) {
|
if (site == null) { // (sub)site not yet exists, create new one
|
||||||
|
|
||||||
|
/* Retrieve application type object */
|
||||||
ApplicationType appType = ApplicationType
|
ApplicationType appType = ApplicationType
|
||||||
.retrieveApplicationTypeForApplication
|
.retrieveApplicationTypeForApplication
|
||||||
(Subsite.getConfig().getFrontPageApplicationType());
|
(Subsite.getConfig().getFrontPageApplicationType());
|
||||||
Assert.exists(appType,
|
Assert.exists(appType,ApplicationType.class);
|
||||||
ApplicationType.class);
|
|
||||||
|
|
||||||
|
/* Retrieve parent application object */
|
||||||
Application parentApp = Application
|
Application parentApp = Application
|
||||||
.retrieveApplicationForPath(
|
.retrieveApplicationForPath(
|
||||||
Subsite.getConfig().getFrontPageParentURL());
|
Subsite.getConfig().getFrontPageParentURL());
|
||||||
Assert.exists(parentApp,
|
Assert.exists(parentApp,Application.class);
|
||||||
Application.class);
|
|
||||||
|
|
||||||
Application frontPage = null;
|
Application frontPage = null;
|
||||||
if (Boolean.TRUE.toString().equals(m_customHomepage
|
if (Boolean.TRUE.toString()
|
||||||
.getValue(state))) {
|
.equals(m_customHomepage.getValue(state))) {
|
||||||
frontPage = Application.createApplication(
|
|
||||||
appType,
|
// custom homepage selected - create one
|
||||||
(String)m_hostname.getValue(state),
|
// hostname hard coded as front page url
|
||||||
(String)m_title.getValue(state),
|
frontPage = Application.createApplication
|
||||||
parentApp
|
( appType,
|
||||||
);
|
(String)m_hostname.getValue(state),
|
||||||
|
(String)m_title.getValue(state),
|
||||||
|
parentApp
|
||||||
|
);
|
||||||
frontPage.setDescription((String)m_description.getValue(state));
|
frontPage.setDescription((String)m_description.getValue(state));
|
||||||
Category.setRootForObject(frontPage,
|
Category.setRootForObject(frontPage,root);
|
||||||
root);
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
frontPage = parentApp;
|
frontPage = parentApp;
|
||||||
// NB, explicitly don't set cat on shared front page!
|
// NB, explicitly don't set cat on shared front page!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// actually create a new subsite
|
||||||
site = Site.create((String)m_title.getValue(state),
|
site = Site.create((String)m_title.getValue(state),
|
||||||
(String)m_description.getValue(state),
|
(String)m_description.getValue(state),
|
||||||
(String)m_hostname.getValue(state),
|
(String)m_hostname.getValue(state),
|
||||||
styleDir,
|
styleDir,
|
||||||
root,
|
root,
|
||||||
frontPage);
|
frontPage);
|
||||||
} else {
|
|
||||||
|
} else { // (sub)site already exists, modify mutable configuration
|
||||||
|
|
||||||
|
// FRONT_PAGE Application not mutable
|
||||||
site.setTitle((String)m_title.getValue(state));
|
site.setTitle((String)m_title.getValue(state));
|
||||||
site.setDescription((String)m_description.getValue(state));
|
site.setDescription((String)m_description.getValue(state));
|
||||||
site.setHostname((String)m_hostname.getValue(state));
|
site.setHostname((String)m_hostname.getValue(state));
|
||||||
site.setStyleDirectory(styleDir);
|
site.setStyleDirectory(styleDir);
|
||||||
site.setRootCategory(root);
|
site.setRootCategory(root);
|
||||||
|
|
||||||
}
|
}
|
||||||
m_site.clearSelection(state);
|
m_site.clearSelection(state);
|
||||||
|
|
||||||
|
|
@ -378,6 +423,9 @@ public class SiteForm extends Form {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
private class ThemesListener implements PrintListener {
|
private class ThemesListener implements PrintListener {
|
||||||
public void prepare(PrintEvent e) {
|
public void prepare(PrintEvent e) {
|
||||||
SingleSelect target = (SingleSelect)e.getTarget();
|
SingleSelect target = (SingleSelect)e.getTarget();
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
* 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.london.subsite.ui;
|
package com.arsdigita.subsite.ui;
|
||||||
|
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
import com.arsdigita.london.subsite.Site;
|
import com.arsdigita.subsite.Site;
|
||||||
import com.arsdigita.bebop.SimpleComponent;
|
import com.arsdigita.bebop.SimpleComponent;
|
||||||
import com.arsdigita.bebop.PageState;
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.domain.DomainCollection;
|
import com.arsdigita.domain.DomainCollection;
|
||||||
|
|
@ -16,14 +16,18 @@
|
||||||
* 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.london.subsite.ui;
|
package com.arsdigita.subsite.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.PageState;
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
||||||
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
|
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
|
||||||
import com.arsdigita.london.subsite.Site;
|
import com.arsdigita.subsite.Site;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class SiteSelectionModel extends ACSObjectSelectionModel {
|
public class SiteSelectionModel extends ACSObjectSelectionModel {
|
||||||
|
|
||||||
public SiteSelectionModel(BigDecimalParameter param) {
|
public SiteSelectionModel(BigDecimalParameter param) {
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>subsite</filter-name>
|
<filter-name>subsite</filter-name>
|
||||||
<filter-class>com.arsdigita.london.subsite.SubsiteFilter</filter-class>
|
<filter-class>com.arsdigita.subsite.SubsiteFilter</filter-class>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
|
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
|
||||||
<init-param>
|
<init-param>
|
||||||
<param-name>template-path</param-name>
|
<param-name>template-path</param-name>
|
||||||
<param-value>/templates/ccm-ldn-subsite</param-value>
|
<param-value>/templates/ccm-subsite</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
</servlet>
|
</servlet>
|
||||||
<!-- module ccm-ldn-subsite - servlet declarations END -->
|
<!-- module ccm-ldn-subsite - servlet declarations END -->
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<!-- module ccm-ldn-subsite - servlet mappings BEGIN -->
|
<!-- module ccm-ldn-subsite - servlet mappings BEGIN -->
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>subsite-files</servlet-name>
|
<servlet-name>subsite-files</servlet-name>
|
||||||
<url-pattern>/ccm-ldn-subsite/files/*</url-pattern>
|
<url-pattern>/ccm-subsite/files/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
<!-- module ccm-ldn-subsite - servlet mappings END -->
|
<!-- module ccm-ldn-subsite - servlet mappings END -->
|
||||||
|
|
||||||
|
|
@ -3,10 +3,10 @@
|
||||||
<xsl:stylesheet
|
<xsl:stylesheet
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
xmlns:subsite="http://ccm.redhat.com/london/subsite/1.0"
|
xmlns:subsite="http://ccm.redhat.com/subsite/1.0"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
<!-- IMPORT DEFINITIONS ccm-ldn-subsite installed as separate web application
|
<!-- IMPORT DEFINITIONS ccm-subsite installed as separate web application
|
||||||
<xsl:import href="../../../../../ROOT/packages/bebop/xsl/bebop.xsl"/>
|
<xsl:import href="../../../../../ROOT/packages/bebop/xsl/bebop.xsl"/>
|
||||||
<xsl:import href="../../../../../ROOT/packages/ui/xsl/ui.xsl"/>
|
<xsl:import href="../../../../../ROOT/packages/ui/xsl/ui.xsl"/>
|
||||||
-->
|
-->
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
|
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
|
||||||
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
||||||
<jsp:directive.page import="com.arsdigita.london.subsite.ui.SiteSelectionModel"/>
|
<jsp:directive.page import="com.arsdigita.subsite.ui.SiteSelectionModel"/>
|
||||||
<jsp:directive.page import="com.arsdigita.london.subsite.ui.ControlCenterPanel"/>
|
<jsp:directive.page import="com.arsdigita.subsite.ui.ControlCenterPanel"/>
|
||||||
<jsp:directive.page import="com.arsdigita.toolbox.ui.ApplicationAuthenticationListener"/>
|
<jsp:directive.page import="com.arsdigita.toolbox.ui.ApplicationAuthenticationListener"/>
|
||||||
|
|
||||||
<jsp:scriptlet>
|
<jsp:scriptlet>
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<ccm:dependencies>
|
<ccm:dependencies>
|
||||||
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
|
||||||
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
|
||||||
<ccm:requires name="ccm-ldn-subsite" version="6.6.0" relation="ge"/>
|
<ccm:requires name="ccm-subsite" version="6.6.0" relation="ge"/>
|
||||||
|
|
||||||
</ccm:dependencies>
|
</ccm:dependencies>
|
||||||
<ccm:contacts>
|
<ccm:contacts>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<table name="inits"/>
|
<table name="inits"/>
|
||||||
<table name="acs_objects"/>
|
<table name="acs_objects"/>
|
||||||
<initializer class="com.arsdigita.core.Initializer"/>
|
<initializer class="com.arsdigita.core.Initializer"/>
|
||||||
<initializer class="com.arsdigita.london.subsite.Initializer"/>
|
<initializer class="com.arsdigita.subsite.Initializer"/>
|
||||||
</requires>
|
</requires>
|
||||||
<provides>
|
<provides>
|
||||||
<!--
|
<!--
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ import com.arsdigita.db.DbHelper;
|
||||||
import com.arsdigita.domain.DomainObject;
|
import com.arsdigita.domain.DomainObject;
|
||||||
import com.arsdigita.domain.DomainObjectInstantiator;
|
import com.arsdigita.domain.DomainObjectInstantiator;
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
import com.arsdigita.kernel.ACSObjectInstantiator;
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
import com.arsdigita.london.subsite.SubsiteConfig;
|
import com.arsdigita.subsite.SubsiteConfig;
|
||||||
import com.arsdigita.themedirector.ui.ThemeXSLParameterGenerator;
|
import com.arsdigita.themedirector.ui.ThemeXSLParameterGenerator;
|
||||||
import com.arsdigita.themedirector.util.ThemeDevelopmentFileManager;
|
import com.arsdigita.themedirector.util.ThemeDevelopmentFileManager;
|
||||||
import com.arsdigita.themedirector.util.ThemePublishedFileManager;
|
import com.arsdigita.themedirector.util.ThemePublishedFileManager;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ package com.arsdigita.themedirector;
|
||||||
import com.arsdigita.dispatcher.DispatcherHelper;
|
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||||
import com.arsdigita.templating.PatternGenerator;
|
import com.arsdigita.templating.PatternGenerator;
|
||||||
|
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,8 @@ import com.arsdigita.themedirector.ThemeDirectorConstants;
|
||||||
import com.arsdigita.themedirector.ThemeDirector;
|
import com.arsdigita.themedirector.ThemeDirector;
|
||||||
import com.arsdigita.themedirector.util.GlobalizationUtil;
|
import com.arsdigita.themedirector.util.GlobalizationUtil;
|
||||||
import com.arsdigita.themedirector.util.ManifestReader;
|
import com.arsdigita.themedirector.util.ManifestReader;
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
import com.arsdigita.london.subsite.Site;
|
import com.arsdigita.subsite.Site;
|
||||||
import com.arsdigita.toolbox.ui.Cancellable;
|
import com.arsdigita.toolbox.ui.Cancellable;
|
||||||
import com.arsdigita.web.Web;
|
import com.arsdigita.web.Web;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ import com.arsdigita.themedirector.ThemeDirector;
|
||||||
import com.arsdigita.templating.XSLParameterGenerator;
|
import com.arsdigita.templating.XSLParameterGenerator;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.arsdigita.web.Web;
|
import com.arsdigita.web.Web;
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
import com.arsdigita.london.subsite.SubsiteContext;
|
import com.arsdigita.subsite.SubsiteContext;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ package com.arsdigita.themedirector.ui.listeners;
|
||||||
import com.arsdigita.bebop.event.ActionEvent;
|
import com.arsdigita.bebop.event.ActionEvent;
|
||||||
import com.arsdigita.bebop.event.ActionListener;
|
import com.arsdigita.bebop.event.ActionListener;
|
||||||
import com.arsdigita.kernel.Kernel;
|
import com.arsdigita.kernel.Kernel;
|
||||||
import com.arsdigita.london.subsite.Subsite;
|
import com.arsdigita.subsite.Subsite;
|
||||||
import com.arsdigita.themedirector.Theme;
|
import com.arsdigita.themedirector.Theme;
|
||||||
import com.arsdigita.themedirector.ThemeDirectorConstants;
|
import com.arsdigita.themedirector.ThemeDirectorConstants;
|
||||||
import com.arsdigita.themedirector.ThemeFile;
|
import com.arsdigita.themedirector.ThemeFile;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue