You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(48) |
Dec
(31) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(22) |
Feb
(68) |
Mar
(185) |
Apr
(11) |
May
(21) |
Jun
(23) |
Jul
(46) |
Aug
(69) |
Sep
(211) |
Oct
(26) |
Nov
(51) |
Dec
(52) |
2006 |
Jan
(13) |
Feb
(13) |
Mar
(8) |
Apr
(21) |
May
(17) |
Jun
(100) |
Jul
(34) |
Aug
(23) |
Sep
(26) |
Oct
(16) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(66) |
Oct
(10) |
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
(8) |
Jun
(5) |
Jul
(31) |
Aug
(8) |
Sep
(11) |
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
(13) |
Feb
(2) |
Mar
(9) |
Apr
(6) |
May
(24) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(120) |
2013 |
Jan
(6) |
Feb
(35) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <pb...@fe...> - 2013-02-02 18:07:32
|
Author: pboy Date: 2013-02-02 18:07:21 +0000 (Sat, 02 Feb 2013) New Revision: 2466 Added: trunk/ccm-core/src/com/arsdigita/core/Loader.java Log: Added missing file. Added: trunk/ccm-core/src/com/arsdigita/core/Loader.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/core/Loader.java (rev 0) +++ trunk/ccm-core/src/com/arsdigita/core/Loader.java 2013-02-02 18:07:21 UTC (rev 2466) @@ -0,0 +1,724 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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.core; + +import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.globalization.Charset; +import com.arsdigita.globalization.Locale; +import com.arsdigita.kernel.EmailAddress; +import com.arsdigita.kernel.Group; +import com.arsdigita.kernel.GroupCollection; +import com.arsdigita.kernel.Kernel; +import com.arsdigita.kernel.KernelExcursion; +// import com.arsdigita.kernel.PackageInstance; +// import com.arsdigita.kernel.PackageType; +import com.arsdigita.kernel.ResourceType; +// import com.arsdigita.kernel.SiteNode; +import com.arsdigita.kernel.User; +import com.arsdigita.kernel.UserAuthentication; +import com.arsdigita.kernel.permissions.PermissionService; +import com.arsdigita.kernel.permissions.PrivilegeDescriptor; +import com.arsdigita.kernel.permissions.UniversalPermissionDescriptor; +import com.arsdigita.kernel.security.KeyStorage; +import com.arsdigita.loader.PackageLoader; +import com.arsdigita.mimetypes.ImageMimeType; +import com.arsdigita.mimetypes.MimeType; +import com.arsdigita.mimetypes.MimeTypeExtension; +import com.arsdigita.mimetypes.TextMimeType; +import com.arsdigita.portal.Portal; +import com.arsdigita.runtime.ConfigError; +import com.arsdigita.runtime.ScriptContext; +import com.arsdigita.ui.admin.Admin; +import com.arsdigita.ui.login.Login; +import com.arsdigita.ui.permissions.Permissions; +import com.arsdigita.util.Assert; +import com.arsdigita.util.StringUtils; +import com.arsdigita.util.UncheckedWrapperException; +import com.arsdigita.util.parameter.CSVParameterReader; +import com.arsdigita.util.parameter.EmailParameter; +import com.arsdigita.util.parameter.Parameter; +import com.arsdigita.util.parameter.StringArrayParameter; +import com.arsdigita.util.parameter.StringParameter; +import com.arsdigita.util.servlet.HttpHost; +import com.arsdigita.web.Application; +import com.arsdigita.web.ApplicationType; +import com.arsdigita.web.Host; +import com.arsdigita.web.Web; +import com.arsdigita.webdevsupport.WebDevSupport; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.mail.internet.InternetAddress; + +import org.apache.log4j.Logger; + + +/** + * Core Loader executes nonrecurring at install time and loads (installs + * and initializes) the Core packages persistently into database. + * + * NOTE: Configuration parameters used at load time MUST be part of Loader + * class and can not delegated to a Config object (derived from AbstractConfig). + * They will (and can) not be persisted into an registry object (file). + * + * @author Rafael H. Schloming <rh...@mi...> + * @version $Revision: #15 $ $Date: 2004/08/16 $ + * @version $Id: CoreLoader.java 1841 2009-03-05 07:52:42Z terry $ + */ +public class Loader extends PackageLoader { + + /** Logger instance for debugging */ + private static final Logger s_log = Logger.getLogger(Loader.class); + +// ///////////////////////////////////////////////////////////////////////////// +// Parameter Section +// ///////////////////////////////////////////////////////////////////////////// + + private EmailParameter m_email = new EmailParameter("waf.admin.email"); + + private StringParameter m_screen = new StringParameter + ("waf.admin.name.screen", Parameter.OPTIONAL, null) { + @Override + public Object getDefaultValue() { + String email = getEmail(); + if (email == null) { + return null; + } else { + int index = email.indexOf("@"); + if (index > 0) { + return email.substring(0, index); + } else { + return email; + } + } + } + }; + + private StringParameter m_given = new StringParameter + ("waf.admin.name.given", Parameter.REQUIRED, null); + + private StringParameter m_family = new StringParameter + ("waf.admin.name.family", Parameter.REQUIRED, null); + + private StringParameter m_password = new StringParameter + ("waf.admin.password", Parameter.REQUIRED, null); + + private StringParameter m_question = new StringParameter + ("waf.admin.password.question", Parameter.REQUIRED, null); + + private StringParameter m_answer = new StringParameter + ("waf.admin.password.answer", Parameter.REQUIRED, null); + + private StringParameter m_dispatcher = new StringParameter + ("waf.login.dispatcher", Parameter.OPTIONAL, + "com.arsdigita.ui.login.DummyDispatcher"); + // "com.arsdigita.ui.login.SubsiteDispatcher"); + + private StringParameter m_resource = new StringParameter + ("waf.mime.resource", Parameter.OPTIONAL, + "com/arsdigita/core/mimetypes.properties"); + + /** + * Recognized character sets + */ + // In Old Initializer: CHARSETS as List.class + // charsets = {"ISO-8859-1","UTF-8"}; + private final Parameter m_charsets = + new StringArrayParameter( + "waf.globalization.charsets", + Parameter.REQUIRED, + new String[] { "ISO-8859-1","UTF-8" } + ); + + /** + * Each entry in the "locales" list is a 4-tuple of the form + * {language, country, variant, charset} + * The charset must be one of the values specified in the "charsets" + * parameter above. + * + * This parameter is only read once in the initial loading step and stored + * in the database (g11n_locales). Subsequent modifications will have no effect! + * + */ + // In OLD Initializer: LOCALES as List.class + private final Parameter m_locales = + new StringArrayParameter( + "waf.globalization.locales", + Parameter.REQUIRED, + new String[] {"en: : :UTF-8","en:GB: :UTF-8","en:US: :UTF-8" + ,"es: : :UTF-8","es:ES: :UTF-8" + ,"da: : :UTF-8","da:DK: :UTF-8" + ,"de: : :UTF-8","de:DE: :UTF-8" + ,"fr: : :UTF-8","fr:FR: :UTF-8" + ,"ru: : :UTF-8" + } + ); + +// ///////////////////////////////////////////////////////////////////////////// +// Parameter Section END +// ///////////////////////////////////////////////////////////////////////////// + + /** + * Constructor, just registers parameters. + */ + public Loader() { + + // Register defined parameters to the context by adding + // the parameter to a map of parameters + register(m_email); + register(m_screen); + register(m_given); + register(m_family); + register(m_password); + register(m_question); + register(m_answer); + register(m_dispatcher); + register(m_resource); + register(m_charsets); + register(m_locales); + + // Probably not used anyway, because Loader parameters are not + // persistent! (see note above) + loadInfo(); + } + +// ///////////////////////////////////////////////////////////////////////////// +// Getter Section for Parameter Values +// ///////////////////////////////////////////////////////////////////////////// + + private String getEmail() { + return ((InternetAddress) get(m_email)).toString(); + } + + private String getScreen() { + return (String) get(m_screen); + } + + private String getGiven() { + return (String) get(m_given); + } + + private String getFamily() { + return (String) get(m_family); + } + + private String getPassword() { + return (String) get(m_password); + } + + private String getQuestion() { + return (String) get(m_question); + } + + private String getAnswer() { + return (String) get(m_answer); + } + + private String getDispatcher() { + return (String) get(m_dispatcher); + } + + private String getResource() { + return (String) get(m_resource); + } + + /** + * Retrieve systems recognized character sets. + * + * @return List of recognized character sets. + */ + private List getCharsets() { + String[] charsets = (String[]) get(m_charsets) ; + return (List) Arrays.asList(charsets) ; + } + + /** + * Retrieve the list of supported locales + * + */ + private List getLocales() { + + /** Value of the locales parameter, a string array of + 4-tuple of locale values (see above) */ + String[] locales = (String[]) get(m_locales) ; + + if (locales != null) { + ArrayList localeTupel = new ArrayList(); + for (int i = 0; i < locales.length ; ++i) { + String[] localeSet = StringUtils.split(locales[i],':'); + localeTupel.add(Arrays.asList(localeSet)); + } + return localeTupel; + } else { + + return null; + + } + } + +// ///////////////////////////////////////////////////////////////////////////// +// Getter Section for Parameter Values END +// ///////////////////////////////////////////////////////////////////////////// + + + public void run(final ScriptContext ctx) { + s_log.debug("CoreLoader run method started."); + new KernelExcursion() { + public void excurse() { + setEffectiveParty(Kernel.getSystemParty()); + + s_log.debug("CoreLoader: Going to init KeyStorage."); + KeyStorage.KERNEL_KEY_STORE.init(); + + s_log.debug("CoreLoader: Going to execute loadHost()."); + loadHost(); + + // s_log.debug("CoreLoader: Going to execute loadSubsite()."); + // loadSubsite(loadKernel()); + + s_log.debug("CoreLoader: Going to create System Administrator."); + createSystemAdministrator(); + + s_log.debug("CoreLoader: Going to execute loadLoginApp()."); + loadLoginApp(); + + s_log.debug("CoreLoader: Going to execute loadAdminApp()."); + loadAdminApp(); + + s_log.debug("CoreLoader: Going to execute loadPermissionsApp()."); + loadPermissionsApp(); // new style legacy free + + s_log.debug("CoreLoader: Going to execute loadWebDev()."); + loadWebDev(); // new style legacy free + + s_log.debug("CoreLoader: Going to execute loadPortal()."); + loadPortal(); + + s_log.debug("CoreLoader: Going to execute loadMimeTypes()."); + loadMimeTypes(); + + s_log.debug("CoreLoader: Going to execute loadGlobalization()."); + loadGlobalization(); + + } + }.run(); + s_log.debug("CoreLoader run method completed."); + } + + /** + * Subject to change. + */ + public static void loadHost() { + + final HttpHost hhost = Web.getConfig().getHost(); + Assert.exists(hhost, HttpHost.class); + + final Host host = Host.retrieve(hhost); + + if (host == null) { + Host.create(hhost.getName(), hhost.getPort()); + } + + // Loader for lucene search engine. + // Used to invoke static class LoaderImpl - method load() in + // com.arsdigita.search.lucene.IndexId. Same procedure is invoked by + // the initializer each time the system starts. So it's redundant here. + // Using initializer code is favourable because it may be conditionally + // performed, depending on configuration (Lucene or Intermedia). + // But the currently given implementation requires the loader + // instruction here to let the code initialization time (i.e. at each + // startup) work properly. If left out here instantiation in + // c.ad.search.lucene.Initializer (public final static Loader LOADER) + // doesn't work! + com.arsdigita.search.lucene.Initializer.LOADER.load(); + + } + + /** + * . + * Note: Loading of Subsite is currently required by Login + * module otherwise Login doesn't work! + * + * @param rootNode +// * @deprecated will be removed without replacement. Naot needed anymore + */ +/* private void loadSubsite(SiteNode rootNode) { + s_log.debug("CoreLoader: Going to execute method loadSubsite()."); + String sDispatcher = ""; + + PackageInstance packageInstance = rootNode.getPackageInstance(); + if (packageInstance == null) { + throw new IllegalStateException + ("No package instance mounted at the root node"); + } + PackageType subsite = packageInstance.getType(); + + // getType() returns a disconnected object. To get a connected object + // we do a findByKey(key). + String packageKey = subsite.getKey(); + try { + subsite = PackageType.findByKey(packageKey); + } catch (DataObjectNotFoundException e) { + throw new IllegalStateException + ("Package Type with key \"" + packageKey + "\" was not found.\n"); + } + + // Set subsite dispatcher class. + subsite.setDispatcherClass(getDispatcher()); + } */ + +// /** +// * Create Root Site Node for loadSubsite() +// * @return root node +// * @deprecated will be removed without replacement. Naot needed anymore +// */ +/* private SiteNode loadKernel() { + // Create Root Site Node + s_log.debug("CoreLoader: Going to execute method loadKernel()."); + + final SiteNode rootNode = SiteNode.createSiteNode(null, null); + + // Create Package Types and Instances + s_log.debug("loadKernel: creating Package Types and Instances."); + PackageType subsite = PackageType.create + ("acs-subsite", "ACS Subsite", "ACS Subsites", + "http://arsdigita.com/acs-subsite/"); + PackageInstance subsiteInstance = subsite.createInstance("Main Site"); + + // Mount instances. + s_log.debug("loadKernel: mount Instances."); + rootNode.mountPackage(subsiteInstance); + + s_log.debug("CoreLoader: Going to complete method loadKernel()."); + return rootNode; + } */ + + + + /** + * Ensure that at least one User with universal "admin" permission exists + * after installation. + */ + private void createSystemAdministrator() { + s_log.debug("CoreLoader: execution of method createSystemAdministrator()."); + final String DO_NOT_CREATE = "*do not create*"; + + String emailAddress = getEmail(); + String screenName = getScreen(); + String givenName = getGiven(); + String familyName = getFamily(); + String password = getPassword(); + String passwordQuestion = getQuestion(); + String passwordAnswer = getAnswer(); + s_log.debug("createSystemAdministrator: EmailAddr: " + emailAddress + + "\n screenName: " + screenName + + "\n givenName: " + givenName ); + + // Allow not creating system administrator account. + // (Specified by setting parameter + // systemAdministratorEmailAddress = "*do not create*"). + // This enables the administrator account to be made using + // other initializers (e.g. LDAP). + + if (emailAddress.equals(DO_NOT_CREATE)) { + s_log.warn("WARNING: System administrator account not created " + + "because email set to '*do not create*'.\n This " + + "will cause problems *unless* account is setup " + + "another way (for example, by an LDAP initializer)."); + return; + } + + // Create the system administrator user. + + s_log.debug("createSystemAdministrator(): going to create new User."); + User sa = new User(); + sa.setPrimaryEmail(new EmailAddress(emailAddress)); + if (screenName != null && + screenName.length() > 0) { + sa.setScreenName(screenName); + } + sa.getPersonName().setGivenName(givenName); + sa.getPersonName().setFamilyName(familyName); + + // Save the system administrator's authentication credentials. + s_log.debug("createSystemAdministrator(): going to save credentials."); + UserAuthentication auth = UserAuthentication.createForUser(sa); + auth.setPassword(password); + auth.setPasswordQuestion(passwordQuestion); + auth.setPasswordAnswer(passwordAnswer); + + // Grant the system administrator universal "admin" permission. + + s_log.debug("createSystemAdministrator(): going to grant admin perms."); + PermissionService.grantPermission + (new UniversalPermissionDescriptor + (PrivilegeDescriptor.ADMIN, sa)); + + // Add system administrator to site-wide administrator group + GroupCollection groupColl = Group.retrieveAll(); + // FIXME: String for Site-wide Admininistrators is hardcoded because + // this group in inserted via sql-command during setup + groupColl.filter("Site-wide Administrators"); + if(groupColl.next()) { + groupColl.getGroup().addMember(sa); + } + groupColl.close(); + + s_log.debug("Adding administrator: \"" + givenName + " " + + familyName + "\" <" + emailAddress + ">"); + s_log.debug("CoreLoader: method createSystemAdministrator() completed."); + + } + + /** + * Setup Login application. Loads type into database and instances the + * single default instance. + * Has to be public access in order to enable script Upgrade664 to use it. + * @return + */ + public static void loadLoginApp() { + + ApplicationType loginType = + new ApplicationType("login", + Login.BASE_DATA_OBJECT_TYPE ); + loginType.setDescription("CCM user login application"); + loginType.save(); + + + Application login = Application.createApplication(loginType, + "register", + "CCM Login", + null); + login.setDescription("CCM login instance"); + + } + + + /** + * Setup core Admin application. Loads type into database and instances the + * single default instance. + * Has to be public access in order to enable script Upgrade664 to use it. + */ + public static void loadAdminApp() { + + ApplicationType adminType = + new ApplicationType("admin", + Admin.BASE_DATA_OBJECT_TYPE ); + adminType.setDescription("CCM user and group administration"); + adminType.save(); + + + Application admin = Application.createApplication(adminType, + "admin", + "CCM Admin", + null); + admin.setDescription("CCM user and group administration instance"); + + } + + /** + * Setup core Admin application. Loads type into database and instances the + * single default instance. + * Has to be public access in order to enable script Upgrade664 to use it. + */ + public static void loadPermissionsApp() { + + /* NOTE: + * The wording in the title parameter of ApplicationType determines + * the name of the subdirectory for the XSL stylesheets. + * It gets "urlized", i.e. trimming leading and trailing blanks and + * replacing blanks between words and illegal characters with an hyphen + * and converted to lower case. + * Example: "Permissions" will become "permissions". + */ + ApplicationType type = + new ApplicationType("Permissions", + Permissions.BASE_DATA_OBJECT_TYPE ); + type.setDescription("CCM permissions administration"); + type.save(); + + Application app = Application.createApplication(type, + "permissions", + "CCM Permissions", + null); + app.setDescription("CCM permissions administration instance"); + app.save(); + + return; + } + + /** + * Loads WebDeveloperSupport as a new style, legacy free application into + * database and instantiate the (only) application instance. + * + * Public static access needed by upgrade script Upgrade664 + * @return webDevType ApplicationType + */ + public static void loadWebDev() { + + ApplicationType webDevType = + new ApplicationType("WebDev Support", + WebDevSupport.BASE_DATA_OBJECT_TYPE ); + webDevType.setDescription("WebDeveloper Support application"); + webDevType.save(); + + Application webDev = Application.createApplication(webDevType, + "ds", + "WebDeveloper Support", + null); + webDev.setDescription("The default WEB developer service instance."); + webDev.save(); + } + + /** + * Load core's basic portal infrastructure. + */ + private void loadPortal() { + s_log.info("Adding resource type: portal"); + // ResourceType manages the entries in table application_types and + // therefore actually creates a sort of new style legacy free + // application type + ResourceType type = ResourceType.createResourceType + ("Portal", Portal.BASE_DATA_OBJECT_TYPE); + type.setDescription("A Portal!"); + } + + /** + * Reads supported mime types from a file and ???. + * + * Run once during initial load. + */ + private void loadMimeTypes() { + ClassLoader cload = Thread.currentThread().getContextClassLoader(); + // get filename containing supported mime types as comma separated list + String resource = getResource(); + InputStream is = cload.getResourceAsStream(resource); + if (is == null) { + throw new IllegalStateException("no such resource: " + resource); + } + + try { + MimeTypeRow row = new MimeTypeRow(); + CSVParameterReader loader = new CSVParameterReader + (new InputStreamReader(is), row.getParameters()); + + while (loader.next()) { + + row.load(loader); + + s_log.info("Adding mimetype: " + row.getType() + " (" + + row.getLabel() + ")"); + MimeType mime = MimeType.createMimeType + (row.getType(), row.getJavaClass(), row.getObjectType()); + mime.setLabel(row.getLabel()); + mime.setFileExtension(row.getDefaultExtension()); + + if (mime instanceof TextMimeType) { + ((TextMimeType) mime).setAllowINSOConvert + ("1".equals(row.getSizerOrINSO())); + } + if (mime instanceof ImageMimeType) { + ((ImageMimeType) mime).setImageSizer(row.getSizerOrINSO()); + } + String[] extensions = + StringUtils.split(row.getExtensions(), ','); + for (int i = 0; i < extensions.length; i++) { + MimeTypeExtension ext = + MimeTypeExtension.create(extensions[i], + mime.getMimeType()); + ext.save(); + } + } + } finally { + try { is.close(); } + catch (IOException e) { throw new UncheckedWrapperException(e); } + } + } + + private void loadGlobalization() throws ConfigError { + List charsets = (List) getCharsets(); + if ( charsets == null ) { + throw new ConfigError + ("You must specify at least one charset in the m_charsets " + + "parameter of the core loader parameter section. " + + "UTF-8 would be a good first choice."); + } + + Map charsetMap = new HashMap(); + + for (Iterator i=charsets.iterator(); i.hasNext(); ) { + String charsetName = (String) i.next(); + s_log.debug("Dealing with charset name: " + charsetName ); + + // Check if this is a valid charset. Is there a better way to do + // this? - va...@re..., Mon 2002-07-29 14:47:41 -0400 + try { + new OutputStreamWriter(new ByteArrayOutputStream(), charsetName); + } catch (UnsupportedEncodingException ex) { + throw new ConfigError + (charsetName + " is not a supported charset"); + } + Charset charset = new Charset(); + charset.setCharset(charsetName); + charset.save(); + charsetMap.put(charsetName, charset); + } + + List locales = (List) getLocales(); + + if ( locales == null ) { + throw new ConfigError + ("You must specify at least one locale in the m_locales " + + "parameter of core loader parameter section. " + + "The \"en\" locale is probably required."); + } + + for (Iterator i=locales.iterator(); i.hasNext(); ) { + List localeData = (List) i.next(); + String language = (String) localeData.get(0); + String country = (String) localeData.get(1); + String variant = (String) localeData.get(2); + String charsetName = (String) localeData.get(3); + Locale locale = new Locale(language, country, variant); + + Charset defaultCharset = (Charset) charsetMap.get(charsetName); + if ( defaultCharset == null ) { + throw new ConfigError + ("You must list " + charsetName + " in the \"m_charsets\" " + + "parameter before using it in the \"m_locales\" " + + "\" parameter."); + } + locale.setDefaultCharset(defaultCharset); + locale.save(); + } + } + +} Property changes on: trunk/ccm-core/src/com/arsdigita/core/Loader.java ___________________________________________________________________ Added: svn:executable + * |
From: <pb...@fe...> - 2013-02-02 17:32:30
|
Author: pboy Date: 2013-02-02 17:32:18 +0000 (Sat, 02 Feb 2013) New Revision: 2465 Added: trunk/ccm-core/src/com/arsdigita/core/Loader_parameter.properties trunk/ccm-core/src/com/arsdigita/core/MimeTypeRow.java trunk/ccm-core/src/com/arsdigita/core/mimetypes.properties Removed: trunk/ccm-core/src/com/arsdigita/core/Loader.java trunk/ccm-core/src/com/arsdigita/core/enterprise.init.nolongerInUse trunk/ccm-core/src/com/arsdigita/core/enterpriseold.init.nolongerInUse trunk/ccm-core/src/com/arsdigita/loader/CoreLoader.java trunk/ccm-core/src/com/arsdigita/loader/CoreLoader_parameter.properties trunk/ccm-core/src/com/arsdigita/loader/MimeTypeRow.java trunk/ccm-core/src/com/arsdigita/loader/mimetypes.properties trunk/ccm-core/src/com/arsdigita/web/WebApp.java.nolongerInUse Modified: trunk/ccm-core/src/com/arsdigita/core/Initializer.java trunk/ccm-core/src/com/arsdigita/core/upgrade/Upgrade664.java trunk/ccm-core/src/com/arsdigita/kernel/Initializer.java trunk/ccm-core/src/com/arsdigita/runtime/RegistryConfig.java Log: Relocated core loader to the proper directory, various formatting and documentation. Modified: trunk/ccm-core/src/com/arsdigita/core/Initializer.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/core/Initializer.java 2013-02-02 17:23:03 UTC (rev 2464) +++ trunk/ccm-core/src/com/arsdigita/core/Initializer.java 2013-02-02 17:32:18 UTC (rev 2465) @@ -23,7 +23,6 @@ import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObjectInstantiator; import com.arsdigita.kernel.ACSObjectInstantiator; -import com.arsdigita.loader.CoreLoader; import com.arsdigita.mimetypes.MimeType; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.Session; @@ -35,25 +34,24 @@ import com.arsdigita.runtime.DomainInitEvent; import com.arsdigita.runtime.PDLInitializer; import com.arsdigita.runtime.RuntimeConfig; -import com.arsdigita.toolbox.CharsetEncodingProvider; -import com.arsdigita.ui.admin.Admin; -import com.arsdigita.util.URLRewriter; -import com.arsdigita.xml.FactoriesSetup; -import com.arsdigita.web.Host; -// import com.arsdigita.web.WebApp; -import com.arsdigita.web.ApplicationType; -import com.arsdigita.workflow.simple.TaskComment; import com.arsdigita.search.converter.Converter; import com.arsdigita.search.converter.ConverterRegistry; -import com.arsdigita.search.converter.PDFConverter; import com.arsdigita.search.converter.ExcelConverter; import com.arsdigita.search.converter.OOConverter; -import com.arsdigita.search.converter.WordConverter; +import com.arsdigita.search.converter.PDFConverter; import com.arsdigita.search.converter.TextConverter; - +import com.arsdigita.search.converter.WordConverter; +import com.arsdigita.toolbox.CharsetEncodingProvider; +import com.arsdigita.ui.admin.Admin; import com.arsdigita.ui.login.Login; import com.arsdigita.ui.permissions.Permissions; +import com.arsdigita.util.URLRewriter; +import com.arsdigita.web.ApplicationType; +import com.arsdigita.web.Host; import com.arsdigita.webdevsupport.WebDevSupport; +import com.arsdigita.workflow.simple.TaskComment; +import com.arsdigita.xml.FactoriesSetup; + import org.apache.log4j.Logger; @@ -123,16 +121,7 @@ } }); -/* Status Experimental - not used anywhere in code base. e.getFactory().registerInstantiator - (WebApp.BASE_DATA_OBJECT_TYPE, - new DomainObjectInstantiator() { - public DomainObject doNewInstance(final DataObject data) { - return new WebApp(data); - } - }); -*/ - e.getFactory().registerInstantiator (TaskComment.BASE_DATA_OBJECT_TYPE, new DomainObjectInstantiator() { public DomainObject doNewInstance(final DataObject data) { @@ -233,7 +222,7 @@ Session session = SessionManager.getSession(); TransactionContext txn = session.getTransactionContext(); txn.beginTxn(); - CoreLoader.loadHost(); + Loader.loadHost(); txn.commitTxn(); s_log.info("Core init(DomainInitEvent) done"); Deleted: trunk/ccm-core/src/com/arsdigita/core/Loader.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/core/Loader.java 2013-02-02 17:23:03 UTC (rev 2464) +++ trunk/ccm-core/src/com/arsdigita/core/Loader.java 2013-02-02 17:32:18 UTC (rev 2465) @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * 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.core; - -import com.arsdigita.loader.CoreLoader; - -/** - * Loader used during the initial setup to load the database, used by - * c.ad.packaging.Load (invoked via "ccm load ..." command) - * - * The loader is specified in the file "/ccm-core.load" (which follows the - * general naming scheme <package-key>.load). - * - * Currently just a wrapper for Class CoreLoader which does the actual work. - * - * ToDo: Should we move CoreLoader into Loader here for systematic reasons? All - * modules use a class Loader (or sometimes <package>Loader) located in the - * base package of the module. Alternatively: put all Loader classes into a - * package "loader". - * - */ -public final class Loader extends CoreLoader { - // Empty -} Added: trunk/ccm-core/src/com/arsdigita/core/Loader_parameter.properties =================================================================== --- trunk/ccm-core/src/com/arsdigita/core/Loader_parameter.properties (rev 0) +++ trunk/ccm-core/src/com/arsdigita/core/Loader_parameter.properties 2013-02-02 17:32:18 UTC (rev 2465) @@ -0,0 +1,49 @@ +waf.admin.email.title=Administrator Email Address +waf.admin.email.purpose=Creation of the system administrator account. +waf.admin.email.example=jo...@ex... +waf.admin.email.format=<user>@<domain> + +waf.admin.name.screen.title=Administrator Screen Name +waf.admin.name.screen.purpose=Creation of the system administrator account. +waf.admin.name.screen.example=joe + +waf.admin.name.given.title=Administrator First Name +waf.admin.name.given.purpose=Creation of the system administrator account. +waf.admin.name.given.example=John + +waf.admin.name.family.title=Administrator Last Name +waf.admin.name.family.purpose=Creation of the system administrator account. +waf.admin.name.family.example=Dough + +waf.admin.password.title=Administrator Password +waf.admin.password.purpose=Creation of the system administrator account. + +waf.admin.password.question.title=Administrator Password Question +waf.admin.password.question.purpose=Asked when the password to the system \ + administrator account is lost and access \ + must be recovered. +waf.admin.password.question.example=Your mother's maiden name. + +waf.admin.password.answer.title=Administrator Password Answer +waf.admin.password.answer.purpose=The correct answer to the \ + Administrator Password Question. +waf.admin.password.answer.example=Dough + +waf.login.stylesheet.title=Login Stylesheet +waf.login.stylesheet.purpose=Styles the login ui. + +waf.login.dispatcher.title=Login Dispatcher +waf.login.dispatcher.purpose=Implements the login ui. + +waf.mime.resource.title=Mime Types Resource +waf.mime.resource.purpose=Mime types are loaded from this resource + +waf.globalization.charsets.title=Recognized Character Sets +waf.globalization.charsets.purpose=List containing the recognized character sets. +waf.globalization.charsets.example="ISO-8859-1,UTF-8" +waf.globalization.charsets.format=[StringArray] + +waf.globalization.locales.title=Locales +waf.globalization.locales.purpose=List of locales, each local is a UNIQUE 4-tuple of the form language:country:variant:charset +waf.globalization.locales.example="en: : :UTF-8, en:GB: :UTF-8, de: : :UTF-8, de:DE: :UTF-8" +waf.globalization.locales.format=[StringArray] Added: trunk/ccm-core/src/com/arsdigita/core/MimeTypeRow.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/core/MimeTypeRow.java (rev 0) +++ trunk/ccm-core/src/com/arsdigita/core/MimeTypeRow.java 2013-02-02 17:32:18 UTC (rev 2465) @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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.core; + +import com.arsdigita.runtime.AbstractConfig; +import com.arsdigita.util.parameter.Parameter; +import com.arsdigita.util.parameter.StringParameter; +import org.apache.log4j.Logger; + +/** + * MimeTypeRow + * A configuration record for MimeTypes + * + * @author Rafael H. Schloming <rh...@mi...> + * @version $Revision: #5 $ $Date: 2004/08/16 $ + * @version $Id: MimeTypeRow.java 2070 2010-01-28 08:47:41Z pboy $ + */ +class MimeTypeRow extends AbstractConfig { + + private static final Logger s_log = Logger.getLogger(MimeTypeRow.class); + + private StringParameter m_type = new StringParameter + ("waf.mime.type", Parameter.REQUIRED, null); + + private StringParameter m_label = new StringParameter + ("waf.mime.label", Parameter.REQUIRED, null); + + private StringParameter m_extensions = new StringParameter + ("waf.mime.extensions", Parameter.REQUIRED, null); + + private StringParameter m_objectType = new StringParameter + ("waf.mime.object_type", Parameter.REQUIRED, null); + + private StringParameter m_sizerOrINSO = new StringParameter + ("waf.mime.sizer_or_inso", Parameter.OPTIONAL, null); + + public MimeTypeRow() { + // super(); + register(m_type); + register(m_label); + register(m_extensions); + register(m_objectType); + register(m_sizerOrINSO); + } + + public String getType() { + return (String) get(m_type); + } + + public String getLabel() { + return (String) get(m_label); + } + + public String getExtensions() { + return (String) get(m_extensions); + } + + /** + * Get default Extension (first one in list) + **/ + + public String getDefaultExtension() { + String exts = getExtensions(); + int index = exts.indexOf(',', 0); + if (index < 0) { + return exts; + } else { + return exts.substring(0, index); + } + } + + private String typeName() { + return (String) get(m_objectType); + } + + public String getObjectType() { + return "com.arsdigita.cms." + typeName(); + } + + public String getJavaClass() { + return "com.arsdigita.mimetypes." + typeName(); + } + + public String getSizerOrINSO() { + return (String) get(m_sizerOrINSO); + } + +} Deleted: trunk/ccm-core/src/com/arsdigita/core/enterprise.init.nolongerInUse =================================================================== --- trunk/ccm-core/src/com/arsdigita/core/enterprise.init.nolongerInUse 2013-02-02 17:23:03 UTC (rev 2464) +++ trunk/ccm-core/src/com/arsdigita/core/enterprise.init.nolongerInUse 2013-02-02 17:32:18 UTC (rev 2465) @@ -1,177 +0,0 @@ -// ccm.core.enterprise.init -// -// Old initialization prozess configuration file. -// - - -// // init com.arsdigita.globalization.Initializer { -// init com.arsdigita.globalization.LegacyInitializer { -// // See http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc -// charsets = { -// "ISO-8859-1", -// "UTF-8" -// }; -// -// // Each entry in the "locales" list is a 4-tuple of the form -// // {language, country, variant, charset} -// // The charset must be one of the values specified in the "charsets" -// // parameter above. -// locales = { -// {"en", "", "", "UTF-8"}, -// {"en", "GB", "", "UTF-8"}, -// {"en", "US", "", "UTF-8"}, -// {"es", "", "", "UTF-8"}, -// {"es", "ES", "", "UTF-8"}, -// {"da", "", "", "UTF-8"}, -// {"da", "DK", "", "UTF-8"}, -// {"de", "", "", "UTF-8"}, -// {"de", "DE", "", "UTF-8"}, -// {"fr", "", "", "UTF-8"}, -// {"fr", "FR", "", "UTF-8"}, -// {"ru", "", "", "UTF-8"} -// }; -// -// // Default character set for locales not explicitly listed above. -// defaultCharset = "UTF-8"; -// } -// - -//- init com.arsdigita.kernel.LegacyInitializer {} - -// Should get integrated into the same configuration file as parameter -// waf.debug, i.e. ccm-core/kernel.properties. -//- init com.arsdigita.webdevsupport.LegacyInitializer { -//- active = false; -//- } - - - -// ///////////////////////////////////////////////////////////////// -// -// Initializer definitely replaced by new initialization system -// -// ///////////////////////////////////////////////////////////////// - -// Move configuration options to enterprise.init.nolongerInUse - -// -init com.arsdigita.kernel.security.LegacyInitializer { -// - securityHelperClass = "com.arsdigita.kernel.security.DefaultSecurityHelper"; -// - sessionTrackingMethod = "cookie"; -// - -// - excludedExtensions = { ".jpg", ".gif", ".png", ".pdf" }; -// - -// -} - - -// Set to true when using intermedia search -//-init com.arsdigita.mimetypes.LegacyMimeTypeInitializer { -//- INSOFilterEnabled = false; -//-} - - - -// init com.arsdigita.toolbox.CharsetEncodingProviderInitializer { } - -// init com.arsdigita.ui.LegacyInitializer { -// If using the default SimplePage class, the following -// two parameters specify the class names of the bebop -// components to (optionally) add to margins of pages - -// The is default set of page components -// defaultLayout = { -// { "top", "com.arsdigita.ui.UserBanner" }, -// { "bottom", "com.arsdigita.ui.SiteBanner" }, -// { "bottom", "com.arsdigita.ui.DebugPanel" } -// // { "left", "com.arsdigita.x.y.z" }, -// // { "right", "com.arsdigita.x.y.z" } -// }; - -// } - -// init com.arsdigita.portal.Initializer { } -// init com.arsdigita.portal.LegacyInitializer { } - - -// The formbuilder application is now deprecated and will -// be removed in the next release. Use the FormItem content -// type instead -// Method commend says: -// /** -// * Called on startup. Note. As you can not find a call -// * to this method in enterprise.ini, this method -// * may appear to execute mysteriously. -// * However, the process that runs through enterprise.ini -// * automitically calls the startup() method of any -// * class that implements com.arsdigita.util.initializer.Initializer -// * present in enterprise.ini -// **/ -// Has to be checked in detail. As of version 6.5 a lot of packages nevertheless -// are using it! -// -// init com.arsdigita.formbuilder.Initializer { } - -// This is an example initializer for populating -// the BebopObjectType & MetaObject stores -//init com.arsdigita.formbuilder.installer.Initializer { -// widgetTypes = { -// { "forms", "Checkbox group", "Checkbox groups", -// "com.arsdigita.formbuilder.PersistentCheckboxGroup", -// "com.arsdigita.formbuilder.ui.editors.CheckboxGroupEditor" }, -// { "forms", "Date field", "Date fields", -// "com.arsdigita.formbuilder.PersistentDate", -// "com.arsdigita.formbuilder.ui.editors.DateForm" } -// }; -// processListenerTypes = { -// { "forms", "Confirmation email", "Confirmation emails", -// "com.arsdigita.formbuilder.actions.ConfirmEmailListener", -// "com.arsdigita.formbuilder.ui.editors.ConfirmEmailForm" }, -// { "forms", "URL redirect", "URL redirects", -// "com.arsdigita.formbuilder.actions.ConfirmRedirectListener", -// "com.arsdigita.formbuilder.ui.editors.ConfirmRedirectForm" } -// }; -// dataQueries = { -// { "forms", "com.arsdigita.formbuilder.DataQueryUsers", -// "List of all registered users" }, -// { "forms", "com.arsdigita.formbuilder.DataQueryPackages", -// "List of all installed packages" } -// }; -//} - -// init com.arsdigita.populate.apps.Initializer { -// numApps=3; -// PopulateAppPair = { -// //populateForum args: numPosts, numMsgs per post -// { "com.arsdigita.forum.PopulateForum", {3, 5}}, -// //populateDocmgr args: numFolderLevels, numFolders, numFiles -// { "com.arsdigita.docmgr.PopulateDocmgr", {3, 2, 2}}, -// //populateFaq args: numQuestions -// { "com.arsdigita.faq.PopulateFaq", {5}}, -// //populateGlossary args: numWords -// { "com.arsdigita.glossary.PopulateGlossary", {5}}, -// //populateBookmarks args: numBookmarks -// { "com.arsdigita.bookmarks.PopulateBookmarks", {5}} -// }; -// } - -// no longer used - old versioning system? -// init com.arsdigita.versioning.Initializer { } - -// Application specific page components -// applicationLayouts = { -// { "forums", -// { -// { "top", "com.arsdigita.x.y.z" }, -// { "left", "com.arsdigita.x.y.z" }, -// { "bottom", "com.arsdigita.x.y.z" }, -// { "right", "com.arsdigita.x.y.z" } -// } -// }, -// { "search", -// { -// { "top", "com.arsdigita.x.y.z" }, -// { "left", "com.arsdigita.x.y.z" }, -// { "bottom", "com.arsdigita.x.y.z" }, -// { "right", "com.arsdigita.x.y.z" } -// } -// } -// }; Deleted: trunk/ccm-core/src/com/arsdigita/core/enterpriseold.init.nolongerInUse =================================================================== --- trunk/ccm-core/src/com/arsdigita/core/enterpriseold.init.nolongerInUse 2013-02-02 17:23:03 UTC (rev 2464) +++ trunk/ccm-core/src/com/arsdigita/core/enterpriseold.init.nolongerInUse 2013-02-02 17:32:18 UTC (rev 2465) @@ -1,83 +0,0 @@ -// ccm.core.enterprise.init.nolongerInUse -// -// Old initialization prozess configuration file. -// configurations definitely no longer used (refactored into new initializser system) -// - - - - -// ///////////////////////////////////////////////////////////////// -// -// Initializer definitely replaced by new initialization system -// -// ///////////////////////////////////////////////////////////////// - - -// -- As of version 6.6.0 release 12 refactored into the new initializer system -// -- and no longer in use. -// -- As of version 6.5.x still in use! -//init com.arsdigita.notification.LegacyInitializer { -// RequestManagerDelay = 900; // in seconds -// RequestManagerPeriod = 900; // in seconds -// SimpleQueueDelay = 900; // in seconds -// SimpleQueuePeriod = 900; // in seconds -// DigestQueueDelay = 900; // in seconds -// DigestQueuePeriod = 900; // in seconds -//} - - -// As of version 6.5.x still in use! -// May be ommitted if ccm-ldn-search is used which sets the search engine -// by its own (Lucene) -// As of version 6.6.0 release 2 refactored into the new initializer system. -// Lucene is now initialized as a sub-initializer of ccm-core initializer. -// init com.arsdigita.search.LegacyInitializer {} - -// As of version 6.5.x still in use! -// As of version 6.6.0 release 2 refactored into the new initializer system. -// Lucene is now initialized as a sub-initializer of ccm-core initializer. -//-- init com.arsdigita.search.lucene.LegacyInitializer {} - -// As of version 6.5.x still in use! -// Comment in to use intermedia search -// As of version 6.6.0 release 2 refactored into the new initializer system. -// Intermedia is now initialized as a sub-initializer of ccm-core initializer. -// It is configured via waf.search.indexer Parameter (may be lucene or intermedia). -// If not enabled, initialization is skipped. -//init com.arsdigita.search.intermedia.LegacyInitializer { -// timerDelay = 60; // Parameters for search timer/indexing -// syncDelay = 60; // All units are time in seconds -// maxSyncDelay = 7200; // see com.arsdigita.search.BuildIndex.java -// maxIndexingTime = 7200; // for definitions -// indexingRetryDelay = 60; -//} - -// Package does no longer exist. -// init com.arsdigita.categorization.dispatch.Initializer { } - -// Application specific page components -// applicationLayouts = { -// { "forums", -// { -// { "top", "com.arsdigita.x.y.z" }, -// { "left", "com.arsdigita.x.y.z" }, -// { "bottom", "com.arsdigita.x.y.z" }, -// { "right", "com.arsdigita.x.y.z" } -// } -// }, -// { "search", -// { -// { "top", "com.arsdigita.x.y.z" }, -// { "left", "com.arsdigita.x.y.z" }, -// { "bottom", "com.arsdigita.x.y.z" }, -// { "right", "com.arsdigita.x.y.z" } -// } -// } -// }; - - -// init com.arsdigita.localization.demo.Initializer { } - -// Class no longer part of source code -// init com.arsdigita.bebop.jsp.Initializer { } Added: trunk/ccm-core/src/com/arsdigita/core/mimetypes.properties =================================================================== --- trunk/ccm-core/src/com/arsdigita/core/mimetypes.properties (rev 0) +++ trunk/ccm-core/src/com/arsdigita/core/mimetypes.properties 2013-02-02 17:32:18 UTC (rev 2465) @@ -0,0 +1,60 @@ +"application/octet-stream", "binary data", "bin,uu,saveme,dump,hqx,arc,o,a,exe,z,jar", "MimeType" +"application/x-dvi", "dvi file", "dvi", "MimeType" +"application/x-latex", "latex file", "latex", "MimeType" +"application/x-tex", "tex file", "tex", "MimeType" +"application/x-texinfo", "texinfo file", "texinfo,texi", "MimeType" +"application/x-troff", "troff file", "tr,t,troff", "MimeType" +"application/x-troff-man", "troff-man file", "man", "MimeType" +"application/x-troff-me", "troff-me file", "me", "MimeType" +"application/x-troff-ms", "troff-ms file", "ms", "MimeType" +"application/x-wais-source", "wais source file", "src,wsrc", "MimeType" +"application/zip", "zip file", "zip", "MimeType" +"application/gzip", "gzip file", "gz", "MimeType" +"application/x-tar", "tar file", "tar", "MimeType" +"audio/basic", "basic sound file", "snd,au", "MimeType" +"audio/x-aiff", "aif sound file", "sound,aifc,aif,aiff", "MimeType" +"audio/x-wav", "wav audio file", "wav", "MimeType" +"video/mpeg", "mpg video", "mpg,mpe", "MimeType" +"video/quicktime", "quicktime video", "mov,qt", "MimeType" +"application/x-msvideo", "avi movie", "avi", "MimeType" +"video/x-sgi-movie", "mv movie", "mv,movie", "MimeType" +"application/vnd.visio", "visio file", "vsd,vst,vsw,vss", "MimeType" +"application/pdf", "Adobe Acrobat", "pdf", "TextMimeType", "1" +"application/msword", "Microsoft Word document formatted", "doc", "TextMimeType", "1" +"application/msaccess", "Microsoft Access Database file", "mdb", "MimeType" +"application/msexcel", "Microsoft Excel document", "xls", "TextMimeType", "1" +"application/ms-powerpoint", "Microsoft Powerpoint file", "ppt,pps,pot", "MimeType" +"application/postscript", "encapsulated PostScript", "ps,eps,ai", "TextMimeType","1" +"application/rtf", "rich text format", "rtf", "TextMimeType", "1" +"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Microsoft Office Open XML Word Document", "docx", "TextMimeType", "1""application/vnd.sun.xml.writer", "OpenOffice Writer", "sxw", "TextMimeType", "1" +"application/vnd.openxmlformats-officedocument.presentationml.presentation", "Microsoft Office Open XML Powerpoint Document", "pptx", "MimeType" +"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "Microsoft Office Open XML Excel Document", "xlsx", "TextMimeType", "1" +"application/vnd.sun.xml.writer.template", "OpenOffice Writer Template", "stw", "TextMimeType", "1" +"application/vnd.sun.xml.calc", "OpenOffice SpreadSheets", "sxc", "TextMimeType", "1" +"application/vnd.sun.xml.calc.template", "OpenOffice SpreadSheets Template", "stc", "TextMimeType", "1" +"application/vnd.sun.xml.draw", "OpenOffice Draw", "sxd", "MimeType" +"application/vnd.sun.xml.draw.template", "OpenOffice Draw Template", "std", "MimeType" +"application/vnd.sun.xml.impress", "OpenOffice Impress", "sxi", "MimeType" +"application/vnd.sun.xml.impress.template", "OpenOffice Impress Template", "sti", "MimeType" +"application/vnd.sun.xml.writer.global", "OpenOffice Writer Global", "sxg", "TextMimeType", "1" +"application/vnd.sun.xml.math", "OpenOffice Math", "sxm", "TextMimeType", "1" +"text/xml", "xml", "xml,xsl,xsd", "TextMimeType", "0" +"text/html", "HTML text", "html,htm", "TextMimeType", "0" +"text/css", "Cascading Style Sheet", "css", "TextMimeType", "0" +"text/plain", "Plain text", "txt,text,c,cc,c++,h,pl,java", "TextMimeType", "0" +"text/sgml", "sgml text", "sgm,sgml", "TextMimeType", "0" +"text/x-jsp", "JSP code", "jsp", "TextMimeType", "0" +"image/gif", "GIF image", "gif", "ImageMimeType", "com.arsdigita.mimetypes.image.GIFImageSizer" +"image/ief", "ief image", "ief", "ImageMimeType", "" +"image/jpeg", "JPG image", "jpg,jpe,jpeg", "ImageMimeType", "com.arsdigita.mimetypes.image.JPEGImageSizer" +"image/tiff", "tif image", "tif,tiff", "ImageMimeType", "" +"image/x-cmu-rast", "raster image", "ras", "ImageMimeType", "" +"image/x-portable-anymap", "anymap image", "pnm", "ImageMimeType", "" +"image/x-portable-bitmap", "bitmap image", "pbm", "ImageMimeType", "" +"image/x-portable-graymap", "graymap image", "pgm", "ImageMimeType", "" +"image/x-portable-pixmap", "pixmap image", "ppm", "ImageMimeType", "" +"image/x-rgb", "rgb image", "rgb", "ImageMimeType", "" +"image/x-xbitmap", "xbm image", "xbm", "ImageMimeType", "" +"image/x-xwindowdump", "x-windowdump", "xwd", "ImageMimeType", "" +"image/bmp", "Windows BMP", "bmp", "ImageMimeType", "com.arsdigita.mimetypes.image.BMPImageSizer" +"image/png", "PNG image", "png", "ImageMimeType", "" Modified: trunk/ccm-core/src/com/arsdigita/core/upgrade/Upgrade664.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/core/upgrade/Upgrade664.java 2013-02-02 17:23:03 UTC (rev 2464) +++ trunk/ccm-core/src/com/arsdigita/core/upgrade/Upgrade664.java 2013-02-02 17:32:18 UTC (rev 2465) @@ -19,7 +19,7 @@ package com.arsdigita.core.upgrade; -import com.arsdigita.loader.CoreLoader; +import com.arsdigita.core.Loader; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.KernelExcursion; import com.arsdigita.util.cmd.Program; @@ -90,28 +90,28 @@ // Previously login had been managed by a (virtual) root // sitenode with login dispatcher associated. // Login application is newly created, old sitenote deactivated. - CoreLoader.loadLoginApp(); + Loader.loadLoginApp(); // Update core Admin application // Old style package type already removed by sql script. // Create a (new type, legacy free) web.ApplicationType type // application - CoreLoader.loadAdminApp(); + Loader.loadAdminApp(); // Update core permission support // Old style package type already removed by sql script. // Create a (new type, legacy free) web.ApplicationType type // application - CoreLoader.loadPermissionsApp(); + Loader.loadPermissionsApp(); // Update core WebDeveloperSupport // Old style package type already removed by sql script. // Create a (new type, legacy free) web.ApplicationType type // application - CoreLoader.loadWebDev(); + Loader.loadWebDev(); // Note: Old PackageType sitenode removed. It's useless now Modified: trunk/ccm-core/src/com/arsdigita/kernel/Initializer.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/kernel/Initializer.java 2013-02-02 17:23:03 UTC (rev 2464) +++ trunk/ccm-core/src/com/arsdigita/kernel/Initializer.java 2013-02-02 17:32:18 UTC (rev 2465) @@ -20,8 +20,8 @@ import com.arsdigita.developersupport.DeveloperSupport; import com.arsdigita.domain.DomainObject; +import com.arsdigita.kernel.permissions.PermissionManager; import com.arsdigita.kernel.permissions.PrivilegeDescriptor; -import com.arsdigita.kernel.permissions.PermissionManager; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.OID; import com.arsdigita.runtime.ContextInitEvent; Deleted: trunk/ccm-core/src/com/arsdigita/loader/CoreLoader.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/loader/CoreLoader.java 2013-02-02 17:23:03 UTC (rev 2464) +++ trunk/ccm-core/src/com/arsdigita/loader/CoreLoader.java 2013-02-02 17:32:18 UTC (rev 2465) @@ -1,690 +0,0 @@ -/* - * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * 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.loader; - -import com.arsdigita.domain.DataObjectNotFoundException; -import com.arsdigita.globalization.Charset; -import com.arsdigita.globalization.Locale; -import com.arsdigita.kernel.EmailAddress; -import com.arsdigita.kernel.Group; -import com.arsdigita.kernel.GroupCollection; -import com.arsdigita.kernel.Kernel; -import com.arsdigita.kernel.KernelExcursion; -import com.arsdigita.kernel.PackageInstance; -import com.arsdigita.kernel.PackageType; -import com.arsdigita.kernel.ResourceType; -import com.arsdigita.kernel.SiteNode; -import com.arsdigita.kernel.User; -import com.arsdigita.kernel.UserAuthentication; -import com.arsdigita.kernel.permissions.PermissionService; -import com.arsdigita.kernel.permissions.PrivilegeDescriptor; -import com.arsdigita.kernel.permissions.UniversalPermissionDescriptor; -import com.arsdigita.kernel.security.KeyStorage; -import com.arsdigita.mimetypes.ImageMimeType; -import com.arsdigita.mimetypes.MimeType; -import com.arsdigita.mimetypes.MimeTypeExtension; -import com.arsdigita.mimetypes.TextMimeType; -import com.arsdigita.portal.Portal; -import com.arsdigita.runtime.ConfigError; -import com.arsdigita.runtime.ScriptContext; -import com.arsdigita.ui.admin.Admin; -import com.arsdigita.ui.login.Login; -import com.arsdigita.ui.permissions.Permissions; -import com.arsdigita.util.Assert; -import com.arsdigita.util.StringUtils; -import com.arsdigita.util.UncheckedWrapperException; -import com.arsdigita.util.parameter.CSVParameterReader; -import com.arsdigita.util.parameter.EmailParameter; -import com.arsdigita.util.parameter.Parameter; -import com.arsdigita.util.parameter.StringArrayParameter; -import com.arsdigita.util.parameter.StringParameter; -import com.arsdigita.util.servlet.HttpHost; -import com.arsdigita.web.Application; -import com.arsdigita.web.ApplicationType; -import com.arsdigita.web.Host; -import com.arsdigita.web.Web; -import com.arsdigita.webdevsupport.WebDevSupport; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.mail.internet.InternetAddress; - -import org.apache.log4j.Logger; - - -/** - * CoreLoader - * - * @author Rafael H. Schloming <rh...@mi...> - * @version $Revision: #15 $ $Date: 2004/08/16 $ - * @version $Id$ - */ -public class CoreLoader extends PackageLoader { - - private static final Logger s_log = Logger.getLogger(CoreLoader.class); - - private EmailParameter m_email = new EmailParameter("waf.admin.email"); - - private StringParameter m_screen = new StringParameter - ("waf.admin.name.screen", Parameter.OPTIONAL, null) { - @Override - public Object getDefaultValue() { - String email = getEmail(); - if (email == null) { - return null; - } else { - int index = email.indexOf("@"); - if (index > 0) { - return email.substring(0, index); - } else { - return email; - } - } - } - }; - - private StringParameter m_given = new StringParameter - ("waf.admin.name.given", Parameter.REQUIRED, null); - - private StringParameter m_family = new StringParameter - ("waf.admin.name.family", Parameter.REQUIRED, null); - - private StringParameter m_password = new StringParameter - ("waf.admin.password", Parameter.REQUIRED, null); - - private StringParameter m_question = new StringParameter - ("waf.admin.password.question", Parameter.REQUIRED, null); - - private StringParameter m_answer = new StringParameter - ("waf.admin.password.answer", Parameter.REQUIRED, null); - - private StringParameter m_dispatcher = new StringParameter - ("waf.login.dispatcher", Parameter.OPTIONAL, - "com.arsdigita.ui.login.DummyDispatcher"); - // "com.arsdigita.ui.login.SubsiteDispatcher"); - - private StringParameter m_resource = new StringParameter - ("waf.mime.resource", Parameter.OPTIONAL, - "com/arsdigita/loader/mimetypes.properties"); - - /** - * Recognized character sets - */ - // In Old Initializer: CHARSETS as List.class - // charsets = {"ISO-8859-1","UTF-8"}; - private final Parameter m_charsets = - new StringArrayParameter( - "waf.globalization.charsets", - Parameter.REQUIRED, - new String[] { "ISO-8859-1","UTF-8" } - ); - - /** - * Each entry in the "locales" list is a 4-tuple of the form - * {language, country, variant, charset} - * The charset must be one of the values specified in the "charsets" - * parameter above. - * - * This parameter is only read once in the initial loading step and stored - * in the database (g11n_locales). Subsequent modifications will have no effect! - * - */ - // In OLD Initializer: LOCALES as List.class - private final Parameter m_locales = - new StringArrayParameter( - "waf.globalization.locales", - Parameter.REQUIRED, - new String[] {"en: : :UTF-8","en:GB: :UTF-8","en:US: :UTF-8" - ,"es: : :UTF-8","es:ES: :UTF-8" - ,"da: : :UTF-8","da:DK: :UTF-8" - ,"de: : :UTF-8","de:DE: :UTF-8" - ,"fr: : :UTF-8","fr:FR: :UTF-8" - ,"ru: : :UTF-8" - } - ); - - public CoreLoader() { - register(m_email); - register(m_screen); - register(m_given); - register(m_family); - register(m_password); - register(m_question); - register(m_answer); - register(m_dispatcher); - register(m_resource); - register(m_charsets); - register(m_locales); - - loadInfo(); - } - - private String getEmail() { - return ((InternetAddress) get(m_email)).toString(); - } - - private String getScreen() { - return (String) get(m_screen); - } - - private String getGiven() { - return (String) get(m_given); - } - - private String getFamily() { - return (String) get(m_family); - } - - private String getPassword() { - return (String) get(m_password); - } - - private String getQuestion() { - return (String) get(m_question); - } - - private String getAnswer() { - return (String) get(m_answer); - } - - private String getDispatcher() { - return (String) get(m_dispatcher); - } - - private String getResource() { - return (String) get(m_resource); - } - - /** - * Retrieve systems recognized character sets. - * - * @return List of recognized character sets. - */ - private List getCharsets() { - String[] charsets = (String[]) get(m_charsets) ; - return (List) Arrays.asList(charsets) ; - } - - /** - * Retrieve the list of supported locales - * - */ - private List getLocales() { - - /** Value of the locales parameter, a string array of - 4-tuple of locale values (see above) */ - String[] locales = (String[]) get(m_locales) ; - - if (locales != null) { - ArrayList localeTupel = new ArrayList(); - for (int i = 0; i < locales.length ; ++i) { - String[] localeSet = StringUtils.split(locales[i],':'); - localeTupel.add(Arrays.asList(localeSet)); - } - return localeTupel; - } else { - - return null; - - } - } - - public void run(final ScriptContext ctx) { - s_log.debug("CoreLoader run method started."); - new KernelExcursion() { - public void excurse() { - setEffectiveParty(Kernel.getSystemParty()); - - s_log.debug("CoreLoader: Going to init KeyStorage."); - KeyStorage.KERNEL_KEY_STORE.init(); - - s_log.debug("CoreLoader: Going to execute loadHost()."); - loadHost(); - - s_log.debug("CoreLoader: Going to execute loadSubsite()."); - loadSubsite(loadKernel()); - - s_log.debug("CoreLoader: Going to execute loadLoginApp()."); - loadLoginApp(); - - s_log.debug("CoreLoader: Going to execute loadAdminApp()."); - loadAdminApp(); - - s_log.debug("CoreLoader: Going to execute loadPermissionsApp()."); - loadPermissionsApp(); // new style legacy free - - s_log.debug("CoreLoader: Going to execute loadWebDev()."); - loadWebDev(); // new style legacy free - - s_log.debug("CoreLoader: Going to execute loadPortal()."); - loadPortal(); - - s_log.debug("CoreLoader: Going to execute loadMimeTypes()."); - loadMimeTypes(); - - s_log.debug("CoreLoader: Going to execute loadGlobalization()."); - loadGlobalization(); - - } - }.run(); - s_log.debug("CoreLoader run method completed."); - } - - /** - * Subject to change. - */ - public static void loadHost() { - - final HttpHost hhost = Web.getConfig().getHost(); - Assert.exists(hhost, HttpHost.class); - - final Host host = Host.retrieve(hhost); - - if (host == null) { - Host.create(hhost.getName(), hhost.getPort()); - } - - // Loader for lucene search engine. - // Used to invoke static class LoaderImpl - method load() in - // com.arsdigita.search.lucene.IndexId. Same procedure is invoked by - // the initializer each time the system starts. So it's redundant here. - // Using initializer code is favourable because it may be conditionally - // performed, depending on configuration (Lucene or Intermedia). - // But the currently given implementation requires the loader - // instruction here to let the code initialization time (i.e. at each - // startup) work properly. If left out here instantiation in - // c.ad.search.lucene.Initializer (public final static Loader LOADER) - // doesn't work! - com.arsdigita.search.lucene.Initializer.LOADER.load(); - - } - - /** - * - * @param rootNode - * @deprecated will be removed without replacement. Naot needed anymore - */ - private void loadSubsite(SiteNode rootNode) { - s_log.debug("CoreLoader: Going to execute method loadSubsite()."); - String sDispatcher = ""; - - PackageInstance packageInstance = rootNode.getPackageInstance(); - if (packageInstance == null) { - throw new IllegalStateException - ("No package instance mounted at the root node"); - } - PackageType subsite = packageInstance.getType(); - - // getType() returns a disconnected object. To get a connected object - // we do a findByKey(key). - String packageKey = subsite.getKey(); - try { - subsite = PackageType.findByKey(packageKey); - } catch (DataObjectNotFoundException e) { - throw new IllegalStateException - ("Package Type with key \"" + packageKey + "\" was not found.\n"); - } - - // Set subsite dispatcher class. - subsite.setDispatcherClass(getDispatcher()); - } - - /** - * Create Root Site Node for loadSubsite() - * @return root node - * @deprecated will be removed without replacement. Naot needed anymore - */ - private SiteNode loadKernel() { - // Create Root Site Node - s_log.debug("CoreLoader: Going to execute method loadKernel()."); - - final SiteNode rootNode = SiteNode.createSiteNode(null, null); - s_log.debug("loadKernel: creating system administrator."); - createSystemAdministrator(); - - // Create Package Types and Instances - s_log.debug("loadKernel: creating Package Types and Instances."); - PackageType subsite = PackageType.create - ("acs-subsite", "ACS Subsite", "ACS Subsites", - "http://arsdigita.com/acs-subsite/"); - PackageInstance subsiteInstance = subsite.createInstance("Main Site"); - - // Mount instances. - s_log.debug("loadKernel: mount Instances."); - rootNode.mountPackage(subsiteInstance); - - s_log.debug("CoreLoader: Going to complete method loadKernel()."); - return rootNode; - } - - - - /** - * Ensure that at least one User with universal "admin" permission exists - * after installation. - */ - private void createSystemAdministrator() { - s_log.debug("CoreLoader: execution of method createSystemAdministrator()."); - final String DO_NOT_CREATE = "*do not create*"; - - String emailAddress = getEmail(); - String screenName = getScreen(); - String givenName = getGiven(); - String familyName = getFamily(); - String password = getPassword(); - String passwordQuestion = getQuestion(); - String passwordAnswer = getAnswer(); - s_log.debug("createSystemAdministrator: EmailAddr: " + emailAddress + - "\n screenName: " + screenName + - "\n givenName: " + givenName ); - - // Allow not creating system administrator account. - // (Specified by setting parameter - // systemAdministratorEmailAddress = "*do not create*"). - // This enables the administrator account to be made using - // other initializers (e.g. LDAP). - - if (emailAddress.equals(DO_NOT_CREATE)) { - s_log.warn("WARNING: System administrator account not created " - + "because email set to '*do not create*'.\n This " - + "will cause problems *unless* account is setup " - + "another way (for example, by an LDAP initializer)."); - return; - } - - // Create the system administrator user. - - s_log.debug("createSystemAdministrator(): going to create new User."); - User sa = new User(); - sa.setPrimaryEmail(new EmailAddress(emailAddress)); - if (screenName != null && - screenName.length() > 0) { - sa.setScreenName(screenName); - } - sa.getPersonName().setGivenName(givenName); - sa.getPersonName().setFamilyName(familyName); - - // Save the system administrator's authentication credentials. - s_log.debug("createSystemAdministrator(): going to save credentials."); - UserAuthentication auth = UserAuthentication.createForUser(sa); - auth.setPassword(password); - auth.setPasswordQuestion(passwordQuestion); - auth.setPasswordAnswer(passwordAnswer); - - // Grant the system administrator universal "admin" permission. - - s_log.debug("createSystemAdministrator(): going to grant admin perms."); - PermissionService.grantPermission - (new UniversalPermissionDescriptor - (PrivilegeDescriptor.ADMIN, sa)); - - // Add system administrator to site-wide administrator group - GroupCollection groupColl = Group.retrieveAll(); - // FIXME: String for Site-wide Admininistrators is hardcoded because - // this group in inserted via sql-command during setup - groupColl.filter("Site-wide Administrators"); - if(groupColl.next()) { - groupColl.getGroup().addMember(sa); - } - groupColl.close(); - - s_log.debug("Adding administrator: \"" + givenName + " " + - familyName + "\" <" + emailAddress + ">"); - s_log.debug("CoreLoader: method createSystemAdministrator() completed."); - - } - - /** - * Setup Login application. Loads type into database and instances the - * single default instance. - * Has to be public access in order to enable script Upgrade664 to use it. - * @return - */ - public static void loadLoginApp() { - - ApplicationType loginType = - new ApplicationType("login", - Login.BASE_DATA_OBJECT_TYPE ); - loginType.setDescription("CCM user login application"); - loginType.save(); - - - Application login = Application.createApplication(loginType, - "register", - "CCM Login", - null); - login.setDescription("CCM login instance"); - - } - - - /** - * Setup core Admin application. Loads type into database and instances the - * single default instance. - * Has to be public access in order to enable script Upgrade664 to use it. - */ - public static void loadAdminApp() { - - ApplicationType adminType = - new ApplicationType("admin", - Admin.BASE_DATA_OBJECT_TYPE ); - adminType.setDescription("CCM user and group administration"); - adminType.save(); - - - Application admin = Application.createApplication(adminType, - "admin", - "CCM Admin", - null); - admin.setDescription("CCM user and group administration instance"); - - } - - /** - * Setup core Admin application. Loads type into database and instances the - * single default instance. - * Has to be public access in order to enable script Upgrade664 to use it. - */ - public static void loadPermissionsApp() { - - /* NOTE: - * The wording in the title parameter of ApplicationType determines - * the name of the subdirectory for the XSL stylesheets. - * It gets "urlized", i.e. trimming leading and trailing blanks and - * replacing blanks between words and illegal characters with an hyphen - * and converted to lower case. - * Example: "Permissions" will become "permissions". - */ - ApplicationType type = - new ApplicationType("Permissions", - Permissions.BASE_DATA_OBJECT_TYPE ); - type.setDescription("CCM permissions administration"); - type.save(); - - Application app = Application.createApplication(type, - "permissions", - "CCM Permissions", - null); - app.setDescription("CCM permissions administration instance"); - app.save(); - - return; - } - - /** - * Loads WebDeveloperSupport as a new style, legacy free application into - * database and instantiate the (only) application instance. - * - * Public static access needed by upgrade script Upgrade664 - * @return webDevType ApplicationType - */ - public static void loadWebDev() { - - ApplicationType webDevType = - new ApplicationType("WebDev Support", - WebDevSupport.BASE_DATA_OBJECT_TYPE ); - webDevType.setDescription("WebDeveloper Support application"); - webDevType.save(); - - Application webDev = Application.createApplication(webDevType, - "ds", - "WebDeveloper Support", - null); - webDev.setDescription("The default WEB developer service instance."); - webDev.save(); - - return; - } - - /** - * Load core's basic portal infrastructure. - */ - private void loadPortal() { - s_log.info("Adding resource type: portal"); - // ResourceType manages the entries in table application_types and - // therefore actually creates a sort of new style legacy free - // application type - ResourceType type = ResourceType.createResourceType - ("Portal", Portal.BASE_DATA_OBJECT_TYPE); - type.setDescription("A Portal!"); - } - - /** - * Reads supported mime types from a file and ???. - * - * Run once during initial load. - */ - private void loadMimeTypes() { - ClassLoader cload = Thread.currentThread().getContextClassLoader(); - // get filename containing supported mime types as comma separated list - String resource = getResource(); - InputStream is = cload.getResourceAsStream(resource); - if (is == null) { - throw new IllegalStateException("no such resource: " + resource); - } - - try { - MimeTypeRow row = new MimeTypeRow(); - CSVParameterReader loader = new CSVParameterReader - (new InputStreamReader(is), row.getParameters()); - - while (loader.next()) { - - row.load(loader); - - s_log.info("Adding mimetype: " + row.getType() + " (" + - row.getLabel() + ")"); - MimeType mime = MimeType.createMimeType - (row.getType(), row.getJavaClass(), row.getObjectType()); - mime.setLabel(row.getLabel()); - mime.setFileExtension(row.getDefaultExtension()); - - if (mime instanceof TextMimeType) { - ((TextMimeType) mime).setAllowINSOConvert - ("1".equals(row.getSizerOrINSO())); - } - if (mime instanceof ImageMimeType) { - ((ImageMimeType) mime).setImageSizer(row.getSizerOrINSO()); - } - String[] extensions = - StringUtils.split(row.getExtensions(), ','); - for (int i = 0; i < extensions.length; i++) { - MimeTypeExtension ext = - MimeTypeExtension.create(extensions[i], - mime.getMimeType()); - ext.save(); - } - } - } finally { - try { is.close(); } - catch (IOException e) { throw new UncheckedWrapperException(e); } - } - } - - private void loadGlobalization() throws ConfigError { - List charsets = (List) getCharsets(); - if ( charsets == null ) { - throw new ConfigError - ("You must specify at least one charset in the m_charsets " + - "parameter of the core loader parameter section. " + - "UTF-8 would be a good first choice."); - } - - Map charsetMap = new HashMap(); - - for (Iterator i=charsets.iterator(); i.hasNext(); ) { - String charsetName = (String) i.next(); - s_log.debug("Dealing with charset name: " + charsetName ); - - // Check if this is a valid charset. Is there a better way to do - // this? - va...@re..., Mon 2002-07-29 14:47:41 -0400 - try { - new OutputStreamWriter(new ByteArrayOutputStream(), charsetName); - } catch (UnsupportedEncodingException ex) { - throw new ConfigError - (charsetName + " is not a supported charset"); - } - Charset charset = new Charset(); - charset.setCharset(charsetName); - charset.save(); - charsetMap.put(charsetName, charset); - } - - List locales = (List) getLocales(); - - if ( locales == null ) { - throw new ConfigError - ("You must specify at least one locale in the m_locales " + - "parameter of core loader parameter section. " + - "The \"en\" locale is probably required."); - } - - for (Iterator i=locales.iterator(); i.hasNext(); ) { - List localeData = (List) i.next(); - String language = (String) localeData.get(0); - String country = (String) localeData.get(1); - String variant = (String) localeData.get(2); - String charsetName = (String) localeData.get(3); - Locale locale = new Locale(language, country, variant); - - Charset defaultCharset = (Charset) charsetMap.get(charsetName); - if ( defaultCharset == null ) { - throw new ConfigError - ("You must list " + charsetName + " in the \"m_charsets\" " + - "parameter before using it in the \"m_locales\" " + - "\" parameter."); - } - locale.setDefaultCharset(defaultCharset); - locale.save(); - } - } - -} Deleted: trunk/ccm-core/src/com/arsdigita/loader/CoreLoader_parameter.properties =================================================================== --- trunk/ccm-core/src/com/arsdigita/loader/CoreLoader_parameter.properties 2013-02-02 17:23:03 UTC (rev 2464) +++ trunk/ccm-core/src/com/arsdigita/loader/CoreLoader_parameter.properties 2013-02-02 17:32:18 UTC (rev 2465) @@ -1,49 +0,0 @@ -waf.admin.email.title=Administrator Email Address -waf.admin.email.purpose=Creation of the system administrator account. -waf.admin.email.example=jo...@ex... -waf.admin.email.format=<user>@<domain> - -waf.admin.name.screen.title=Administrator Screen Name -waf.admin.name.screen.purpose=Creation of the system administrator account. -waf.admin.name.screen.example=joe - -waf.admin.name.given.title=Administrator First Name -waf.admin.name.given.purpose=Creation of the system administrator account. -waf.admin.name.given.example=John - -waf.admin.name.family.title=Administrator Last Name -waf.admin.name.family.purpose=Creation of the system administrator account. -waf.admin.name.family.example=Dough - -waf.admin.password.title=Administrator Password -waf.admin.password.purpose=Creation of the system administrator account. - -waf.admin.password.question.title=Administrator Password Question -waf.admin.password.question.purpose=Asked when the password to the system \ - administrator account is lost and access \ - must be recovered. -waf.admin.password.question.example=Your mother's maiden name. - -waf.admin.password.answer.title=Administrator Password Answer -waf.admin.password.answer.purpose=The correct answer to the \ - Administrator Password Question. -waf.admin.password.answer.example=Dough - -waf.login.stylesheet.title=Login Stylesheet -waf.login.stylesheet.purpose=Styles the login ui. - -waf.login.dispatcher.title=Login Dispatcher -waf.login.dispatcher.purpose=Implements the login ui. - -waf.mime.resource.title=Mime Types Resource -waf.mime.resource.purpose=Mime types are loaded from this resource - -waf.globalization.charsets.title=Recognized Character Sets -waf.globalization.charsets.purpose=List containing the recognized character sets. -waf.globalization.charsets.example="ISO-8859-1,UTF-8" -waf.globalization.charsets.format=[StringArray] - -waf.globalization.locales.title=Locales -waf.globalization.locales.purpose=List of locales, each local is a UNIQUE 4-tuple of the form language:country:variant:charset -waf.globalization.locales.example="en: : :UTF-8, en:GB: :UTF-8, de: : :UTF-8, de:DE: :UTF-8" -waf.globalization.locales.format=[StringArray] Deleted: trunk/ccm-core/src/com/arsdigita/loader/MimeTypeRow.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/loader/MimeTypeRow.java 2013-02-02 17:23:03 UTC (rev 2464) +++ trunk/ccm-core/src/com/arsdigita/loader/MimeTypeRow.java 2013-02-02 17:32:18 UTC (rev 2465) @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * 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.loader; - -import com.arsdigita.runtime.AbstractConfig; -import com.arsdigita.util.parameter.Param... [truncated message content] |
From: <pb...@fe...> - 2013-02-02 17:23:14
|
Author: pboy Date: 2013-02-02 17:23:03 +0000 (Sat, 02 Feb 2013) New Revision: 2464 Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitBundleCollection.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonOrgaUnitsStep.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonOrgaUnitsTable.java Modified: trunk/ccm-cms/src/WEB-INF/content-types/GenericPerson.xml trunk/ccm-cms/src/com/arsdigita/cms/Initializer.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitContactAddForm.java trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/AuthoringKitWizard.java trunk/ccm-core/src/com/arsdigita/domain/xml/TraversalHandler.java Log: Improved ItemSearchWidget (create contact), added authoring step for genericPerson. Modified: trunk/ccm-cms/src/WEB-INF/content-types/GenericPerson.xml =================================================================== --- trunk/ccm-cms/src/WEB-INF/content-types/GenericPerson.xml 2013-02-02 16:40:47 UTC (rev 2463) +++ trunk/ccm-cms/src/WEB-INF/content-types/GenericPerson.xml 2013-02-02 17:23:03 UTC (rev 2464) @@ -29,7 +29,7 @@ component="com.arsdigita.cms.contenttypes.ui.GenericPersonContactPropertiesStep" ordering="2"/> - <ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/> + <ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/> </ctd:authoring-kit> </ctd:content-type> Modified: trunk/ccm-cms/src/com/arsdigita/cms/Initializer.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/Initializer.java 2013-02-02 16:40:47 UTC (rev 2463) +++ trunk/ccm-cms/src/com/arsdigita/cms/Initializer.java 2013-02-02 17:23:03 UTC (rev 2464) @@ -18,7 +18,10 @@ */ package com.arsdigita.cms; +import com.arsdigita.cms.contenttypes.GenericPerson; import com.arsdigita.cms.contenttypes.Link; +import com.arsdigita.cms.contenttypes.ui.GenericPersonOrgaUnitsStep; +import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.cms.dispatcher.AssetURLFinder; import com.arsdigita.cms.dispatcher.ItemDelegatedURLPatternGenerator; import com.arsdigita.cms.dispatcher.ItemTemplatePatternGenerator; @@ -36,6 +39,7 @@ import com.arsdigita.cms.search.LaunchDateFilterType; import com.arsdigita.cms.search.LuceneQueryEngine; import com.arsdigita.cms.search.VersionFilterType; +import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.workflow.CMSEngine; import com.arsdigita.cms.workflow.CMSTask; import com.arsdigita.cms.workflow.CMSTaskType; @@ -93,8 +97,8 @@ /** Creates a s_logging category with name = to the full name of class */ private static Logger s_log = Logger.getLogger(Initializer.class); - /** Configuration object for the CMS module */ + /** Configuration object for the CMS module */ private static final CMSConfig s_conf = CMSConfig.getInstance(); /** @@ -107,10 +111,8 @@ s_log.debug("CMS.Initializer.(Constructor) invoked"); - add(new PDLInitializer - (new ManifestSource - ("ccm-cms.pdl.mf", - new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl")))); + add(new PDLInitializer(new ManifestSource("ccm-cms.pdl.mf", + new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl")))); add(new com.arsdigita.cms.contentsection.Initializer()); add(new com.arsdigita.cms.publishToFile.Initializer()); @@ -131,28 +133,28 @@ super.init(e); /* Register object instantiator for Workspace (Content Center) */ - e.getFactory().registerInstantiator - (Workspace.BASE_DATA_OBJECT_TYPE, - new ACSObjectInstantiator() { - @Override - public DomainObject doNewInstance(DataObject dobj) { - return new Workspace(dobj); - } - } ); + e.getFactory().registerInstantiator(Workspace.BASE_DATA_OBJECT_TYPE, + new ACSObjectInstantiator() { + @Override + public DomainObject doNewInstance(DataObject dobj) { + return new Workspace(dobj); + } + }); + LanguageUtil.setSupportedLanguages( - Kernel.getConfig().getSupportedLanguages()); + Kernel.getConfig().getSupportedLanguages()); /* Register object instantiator for CMS Service */ - e.getFactory().registerInstantiator - (Service.BASE_DATA_OBJECT_TYPE, - new ACSObjectInstantiator() { - @Override - public DomainObject doNewInstance(DataObject dobj) { - return new Service(dobj); - } - } ); + e.getFactory().registerInstantiator(Service.BASE_DATA_OBJECT_TYPE, + new ACSObjectInstantiator() { + @Override + public DomainObject doNewInstance(DataObject dobj) { + return new Service(dobj); + } + }); + URLService.registerFinder(ContentPage.BASE_DATA_OBJECT_TYPE, new ItemURLFinder()); URLService.registerFinder(ContentBundle.BASE_DATA_OBJECT_TYPE, @@ -163,54 +165,54 @@ new AssetURLFinder()); URLService.registerFinder( - Link.BASE_DATA_OBJECT_TYPE, - new URLFinder() { - public String find(OID oid, String context) - throws NoValidURLException { + Link.BASE_DATA_OBJECT_TYPE, + new URLFinder() { + public String find(OID oid, String context) + throws NoValidURLException { - return find(oid); - } - public String find( OID oid ) - throws NoValidURLException { - - Link link; - try { - link = (Link) DomainObjectFactory.newInstance( oid ); - } catch( DataObjectNotFoundException ex ) { - throw new NoValidURLException - ( "Cannot find an object with oid: " + oid ); + return find(oid); } - if (Link.EXTERNAL_LINK.equals(link.getTargetType())) { - return link.getTargetURI(); - } else { - ContentItem target = link.getTargetItem(); + public String find(OID oid) + throws NoValidURLException { + Link link; try { - return URLService.locate( target.getOID() ); - } catch( URLFinderNotFoundException ex ) { - throw new UncheckedWrapperException( ex ); + link = (Link) DomainObjectFactory.newInstance(oid); + } catch (DataObjectNotFoundException ex) { + throw new NoValidURLException("Cannot find an object with oid: " + oid); } + + if (Link.EXTERNAL_LINK.equals(link.getTargetType())) { + return link.getTargetURI(); + } else { + ContentItem target = link.getTargetItem(); + + try { + return URLService.locate(target.getOID()); + } catch (URLFinderNotFoundException ex) { + throw new UncheckedWrapperException(ex); + } + } } - } - } - ); + }); + ImageSizerFactory.initialize(); registerInstantiators(e.getFactory()); registerLuceneEngine(); registerIntermediaEngine(); registerPatternGenerators(); - + // cg - register Task Retrieval engine Engine.registerEngine(CMSEngine.CMS_ENGINE_TYPE, new CMSEngine()); // Setup Workspace tab to URL mapping final String workspaceURL = CMS.WORKSPACE_PACKAGE_KEY; final String contentCenterMap = s_conf.getContentCenterMap(); - WorkspaceSetup workspaceSetup = new WorkspaceSetup( workspaceURL, - contentCenterMap); + WorkspaceSetup workspaceSetup = new WorkspaceSetup(workspaceURL, + contentCenterMap); workspaceSetup.run(); // register item adapters @@ -220,22 +222,26 @@ // Just set the class implementing methods run when for publishing // or unpublishing to file. No initialisation of the class here. try { - QueueManager.setListener((PublishToFileListener) - ContentSection.getConfig() - .getPublishToFileClass().newInstance()); + QueueManager.setListener((PublishToFileListener) ContentSection.getConfig() + .getPublishToFileClass().newInstance()); } catch (InstantiationException ex) { - throw new UncheckedWrapperException - ("Failed to instantiate the listener class", ex); + throw new UncheckedWrapperException("Failed to instantiate the listener class", ex); } catch (IllegalAccessException ex) { - throw new UncheckedWrapperException - ("Couldn't access the listener class", ex); + throw new UncheckedWrapperException("Couldn't access the listener class", ex); } MetadataProviderRegistry.registerAdapter( - FileAsset.BASE_DATA_OBJECT_TYPE, - new AssetMetadataProvider()); + FileAsset.BASE_DATA_OBJECT_TYPE, + new AssetMetadataProvider()); + AuthoringKitWizard.registerAssetStep( + GenericPerson.BASE_DATA_OBJECT_TYPE, + GenericPersonOrgaUnitsStep.class, + ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"), + ContenttypesGlobalizationUtil.globalize("person.authoring.orgas.title"), + 20); + s_log.debug("CMS.Initializer.init(DomainInitEvent) completed"); } // END init(DomainInitEvent e) @@ -245,113 +251,112 @@ */ private void registerPatternGenerators() { PatternStylesheetResolver.registerPatternGenerator( - "item_template_oid", - new ItemTemplatePatternGenerator() - ); + "item_template_oid", + new ItemTemplatePatternGenerator()); PatternStylesheetResolver.registerPatternGenerator( - "item_delegated_url", - new ItemDelegatedURLPatternGenerator() - ); + "item_delegated_url", + new ItemDelegatedURLPatternGenerator()); } /** * Registers object instantiators */ - private void registerInstantiators(DomainObjectFactory f) { + private void registerInstantiators(DomainObjectFactory f) { // Register the CMSTaskInstaniator - f.registerInstantiator - (CMSTask.BASE_DATA_OBJECT_TYPE, - new ACSObjectInstantiator() { - @Override - public DomainObject doNewInstance(DataObject dataObject) { - return new CMSTask(dataObject); - } - }); - f.registerInstantiator - (CMSTaskType.BASE_DATA_OBJECT_TYPE, - new DomainObjectInstantiator() { - public DomainObject doNewInstance(DataObject dataObject) { - return new CMSTaskType(dataObject); - } - }); - f.registerInstantiator - (TaskEventURLGenerator.BASE_DATA_OBJECT_TYPE, - new DomainObjectInstantiator() { - public DomainObject doNewInstance(DataObject dataObject) { - return new TaskEventURLGenerator(dataObject); - } - }); - - f.registerInstantiator - (Workflow.BASE_DATA_OBJECT_TYPE, - new ACSObjectInstantiator() { - public DomainObject doNewInstance(DataObject dataObject) { - return new Workflow(dataObject); - } - }); + f.registerInstantiator(CMSTask.BASE_DATA_OBJECT_TYPE, + new ACSObjectInstantiator() { + @Override + public DomainObject doNewInstance(DataObject dataObject) { + return new CMSTask(dataObject); + } - f.registerInstantiator - (WorkflowTemplate.BASE_DATA_OBJECT_TYPE, - new ACSObjectInstantiator() { - @Override - public DomainObject doNewInstance(DataObject dataObject) { - return new WorkflowTemplate(dataObject); - } - }); + }); + f.registerInstantiator(CMSTaskType.BASE_DATA_OBJECT_TYPE, + new DomainObjectInstantiator() { + public DomainObject doNewInstance(DataObject dataObject) { + return new CMSTaskType(dataObject); + } - f.registerInstantiator - (TemplateContext.BASE_DATA_OBJECT_TYPE, - new DomainObjectInstantiator() { - public DomainObject doNewInstance(DataObject dataObject) { - return new TemplateContext(dataObject); - } - @Override - public DomainObjectInstantiator - resolveInstantiator(DataObject obj) { - return this; - } - }); - } + }); + f.registerInstantiator(TaskEventURLGenerator.BASE_DATA_OBJECT_TYPE, + new DomainObjectInstantiator() { + public DomainObject doNewInstance(DataObject dataObject) { + return new TaskEventURLGenerator(dataObject); + } + }); + + f.registerInstantiator(Workflow.BASE_DATA_OBJECT_TYPE, + new ACSObjectInstantiator() { + public DomainObject doNewInstance(DataObject dataObject) { + return new Workflow(dataObject); + } + + }); + + f.registerInstantiator(WorkflowTemplate.BASE_DATA_OBJECT_TYPE, + new ACSObjectInstantiator() { + @Override + public DomainObject doNewInstance(DataObject dataObject) { + return new WorkflowTemplate(dataObject); + } + + }); + + f.registerInstantiator(TemplateContext.BASE_DATA_OBJECT_TYPE, + new DomainObjectInstantiator() { + public DomainObject doNewInstance(DataObject dataObject) { + return new TemplateContext(dataObject); + } + + @Override + public DomainObjectInstantiator resolveInstantiator(DataObject obj) { + return this; + } + + }); + } + private void registerLuceneEngine() { QueryEngineRegistry.registerEngine(IndexerType.LUCENE, - new FilterType[] { - new CategoryFilterType(), - new ContentSectionFilterType(), - new CMSContentSectionFilterType(), - new ContentTypeFilterType(), - new CreationDateFilterType(), - new CreationUserFilterType(), - new LastModifiedDateFilterType(), - new LastModifiedUserFilterType(), - new ObjectTypeFilterType(), - new PermissionFilterType(), - new VersionFilterType() - }, + new FilterType[]{ + new CategoryFilterType(), + new ContentSectionFilterType(), + new CMSContentSectionFilterType(), + new ContentTypeFilterType(), + new CreationDateFilterType(), + new CreationUserFilterType(), + new LastModifiedDateFilterType(), + new LastModifiedUserFilterType(), + new ObjectTypeFilterType(), + new PermissionFilterType(), + new VersionFilterType() + }, new LuceneQueryEngine()); } private void registerIntermediaEngine() { QueryEngineRegistry.registerEngine(IndexerType.INTERMEDIA, - new FilterType[] { - new CategoryFilterType(), - new ContentSectionFilterType(), - new CMSContentSectionFilterType(), - new ContentTypeFilterType(), - new CreationDateFilterType(), - new CreationUserFilterType(), - new LastModifiedDateFilterType(), - new LastModifiedUserFilterType(), - new LaunchDateFilterType(), - new ObjectTypeFilterType(), - new PermissionFilterType(), - new VersionFilterType() - }, + new FilterType[]{ + new CategoryFilterType(), + new ContentSectionFilterType(), + new CMSContentSectionFilterType(), + new ContentTypeFilterType(), + new CreationDateFilterType(), + new CreationUserFilterType(), + new LastModifiedDateFilterType(), + new LastModifiedUserFilterType(), + new LaunchDateFilterType(), + new ObjectTypeFilterType(), + new PermissionFilterType(), + new VersionFilterType() + }, new IntermediaQueryEngine()); } + } Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties 2013-02-02 16:40:47 UTC (rev 2463) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties 2013-02-02 17:23:03 UTC (rev 2464) @@ -147,3 +147,8 @@ cms.contenttypes.ui.person.select_contact.already_added=The selected contact has already been added to current item. cms.contenttypes.ui.person.alias.delete.label=Delete cms.contenttypes.ui.person.alias.delete.confirm=Are you sure to remove the alias? +person.ui.orgaunits.none=This person is not assigned to any organizational units. +person.ui.orgaunits.columns.name=Title +person.ui.orgaunits.columns.year=Year +person.ui.orgaunits.columns.type=Type +person.authoring.orgas.title=Organisational Units Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties 2013-02-02 16:40:47 UTC (rev 2463) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties 2013-02-02 17:23:03 UTC (rev 2464) @@ -158,3 +158,8 @@ cms.contenttypes.ui.person.select_contact.already_added=Das ausgew\u00e4hlte Kontakt-Item wurde dem aktuellen Item bereits hinzugef\u00fcgt. cms.contenttypes.ui.person.alias.delete.label=L\u00f6schen cms.contenttypes.ui.person.alias.delete.confirm=Sind Sie sicher, dass Sie das Alias entfernen wollen? +person.ui.orgaunits.none=Diese Person ist keiner Organisationseinheit zugewiesen. +person.ui.orgaunits.columns.name=Titel +person.ui.orgaunits.columns.year=Jahr +person.ui.orgaunits.columns.type=Typ +person.authoring.orgas.title=Organisationseinheiten Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitBundleCollection.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitBundleCollection.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitBundleCollection.java 2013-02-02 17:23:03 UTC (rev 2464) @@ -0,0 +1,34 @@ +package com.arsdigita.cms.contenttypes; + +import com.arsdigita.cms.ContentBundle; +import com.arsdigita.domain.DomainCollection; +import com.arsdigita.domain.DomainObjectFactory; +import com.arsdigita.persistence.DataCollection; + +/** + * + * @author Jens Pelzetter <je...@jp...> + * @version $Id$ + */ +public class GenericOrganizationalUnitBundleCollection extends DomainCollection { + + public GenericOrganizationalUnitBundleCollection(final DataCollection dataCollection) { + super(dataCollection); + m_dataCollection.addOrder("name asc"); + } + + public GenericOrganizationalUnitBundle getGenericOrganizationalUnitBundle() { + return new GenericOrganizationalUnitBundle(m_dataCollection.getDataObject()); + } + + public GenericOrganizationalUnit getGenericOrganizationalUnit() { + final ContentBundle bundle = (ContentBundle) DomainObjectFactory.newInstance(m_dataCollection.getDataObject()); + return (GenericOrganizationalUnit) bundle.getPrimaryInstance(); + } + + public GenericOrganizationalUnit getGenericOrganizationalUnit(final String language) { + final ContentBundle bundle = (ContentBundle) DomainObjectFactory.newInstance(m_dataCollection.getDataObject()); + return (GenericOrganizationalUnit) bundle.getInstance(language); + } + +} Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitContactAddForm.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitContactAddForm.java 2013-02-02 16:40:47 UTC (rev 2463) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitContactAddForm.java 2013-02-02 17:23:03 UTC (rev 2464) @@ -78,7 +78,7 @@ "cms.contenttypes.ui.genericorgaunit.select_contact").localize())); m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType. findByAssociatedObjectType(GenericContact.class.getName())); - m_itemSearch.setDisableCreatePane(true); + m_itemSearch.setDisableCreatePane(false); add(m_itemSearch); selectedContactLabel = new Label(""); Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonOrgaUnitsStep.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonOrgaUnitsStep.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonOrgaUnitsStep.java 2013-02-02 17:23:03 UTC (rev 2464) @@ -0,0 +1,27 @@ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; +import com.arsdigita.cms.ui.authoring.SimpleEditStep; + +/** + * + * @author Jens Pelzetter <je...@jp...> + * @version $Id$ + */ +public class GenericPersonOrgaUnitsStep extends SimpleEditStep { + + public GenericPersonOrgaUnitsStep(final ItemSelectionModel itemModel, final AuthoringKitWizard parent) { + this(itemModel, parent, null); + } + + public GenericPersonOrgaUnitsStep(final ItemSelectionModel itemModel, + final AuthoringKitWizard parent, + final String prefix) { + super(itemModel, parent, prefix); + + final GenericPersonOrgaUnitsTable table = new GenericPersonOrgaUnitsTable(itemModel); + setDisplayComponent(table); + } + +} Added: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonOrgaUnitsTable.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonOrgaUnitsTable.java (rev 0) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonOrgaUnitsTable.java 2013-02-02 17:23:03 UTC (rev 2464) @@ -0,0 +1,151 @@ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.Component; +import com.arsdigita.bebop.Label; +import com.arsdigita.bebop.Link; +import com.arsdigita.bebop.PageState; +import com.arsdigita.bebop.Table; +import com.arsdigita.bebop.table.TableCellRenderer; +import com.arsdigita.bebop.table.TableColumn; +import com.arsdigita.bebop.table.TableColumnModel; +import com.arsdigita.bebop.table.TableModel; +import com.arsdigita.bebop.table.TableModelBuilder; +import com.arsdigita.cms.CMS; +import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.ItemSelectionModel; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitBundleCollection; +import com.arsdigita.cms.contenttypes.GenericPerson; +import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; +import com.arsdigita.cms.dispatcher.ItemResolver; +import com.arsdigita.domain.DomainObjectFactory; +import com.arsdigita.persistence.DataCollection; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.util.LockableImpl; +import java.math.BigDecimal; + +/** + * + * @author Jens Pelzetter <je...@jp...> + * @version $Id$ + */ +public class GenericPersonOrgaUnitsTable extends Table { + + private final static String TABLE_COL_EDIT = "table_col_edit"; + private final static String TABLE_COL_YEAR = "table_col_year"; + private final static String TABLE_COL_TYPE = "table_col_type"; + private ItemSelectionModel itemModel; + + public GenericPersonOrgaUnitsTable(final ItemSelectionModel itemModel) { + super(); + + this.itemModel = itemModel; + + setEmptyView(new Label(ContenttypesGlobalizationUtil.globalize("person.ui.orgaunits.none"))); + + final TableColumnModel columnModel = getColumnModel(); + columnModel.add(new TableColumn( + 0, + ContenttypesGlobalizationUtil.globalize("person.ui.orgaunits.columns.name").localize(), + TABLE_COL_EDIT)); + columnModel.add(new TableColumn( + 2, + ContenttypesGlobalizationUtil.globalize("person.ui.orgaunits.columns.type").localize(), + TABLE_COL_TYPE)); + + setModelBuilder(new ModelBuilder(itemModel)); + + columnModel.get(0).setCellRenderer(new EditCellRenderer()); + } + + private class ModelBuilder extends LockableImpl implements TableModelBuilder { + + private final ItemSelectionModel itemModel; + + public ModelBuilder(final ItemSelectionModel itemModel) { + this.itemModel = itemModel; + } + + public TableModel makeModel(final Table table, final PageState state) { + table.getRowSelectionModel().clearSelection(state); + + final GenericPerson person = (GenericPerson) itemModel.getSelectedItem(state); + + return new Model(table, state, person); + } + + } + + private class Model implements TableModel { + + private final Table table; + private final GenericOrganizationalUnitBundleCollection orgaUnits; + + public Model(final Table table, final PageState state, final GenericPerson person) { + this.table = table; + orgaUnits = + new GenericOrganizationalUnitBundleCollection((DataCollection) person.getGenericPersonBundle().get("organizationalunits")); + } + + @Override + public int getColumnCount() { + return table.getColumnModel().size(); + } + + @Override + public boolean nextRow() { + boolean ret; + + if ((orgaUnits != null) && orgaUnits.next()) { + ret = true; + } else { + ret = false; + } + + return ret; + } + + @Override + public Object getElementAt(final int columnIndex) { + switch (columnIndex) { + case 0: + return orgaUnits.getGenericOrganizationalUnit().getTitle(); + case 1: + return ((DataObject) orgaUnits.getGenericOrganizationalUnit().get("type")).get("label"); + default: + return null; + } + } + + @Override + public Object getKeyAt(final int columnIndex) { + return orgaUnits.getGenericOrganizationalUnit().getID(); + } + + } + + private class EditCellRenderer extends LockableImpl implements TableCellRenderer { + + public Component getComponent(final Table table, + final PageState state, + final Object value, + final boolean isSelected, + final Object key, + final int row, + final int column) { + //final com.arsdigita.cms.SecurityManager securityManager = CMS.getSecurityManager(state); + final GenericOrganizationalUnit orgaUnit = new GenericOrganizationalUnit((BigDecimal) key); + + final ContentSection section = CMS.getContext().getContentSection(); + final ItemResolver resolver = section.getItemResolver(); + final Link link = new Link(value.toString(), + resolver.generateItemURL(state, + orgaUnit, + section, + orgaUnit.getVersion())); + return link; + + } + + } +} Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/AuthoringKitWizard.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/AuthoringKitWizard.java 2013-02-02 16:40:47 UTC (rev 2463) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/AuthoringKitWizard.java 2013-02-02 17:23:03 UTC (rev 2464) @@ -69,6 +69,7 @@ import java.util.Collection; import java.util.Iterator; import java.util.ArrayList; +import java.util.Collections; /** * <p>This class represents a single authoring kit. The wizard @@ -102,7 +103,8 @@ AuthoringKitWizard.class, ContentType.class }; - private static final ArrayList s_assets = new ArrayList(); + //private static final ArrayList s_assets = new ArrayList(); + private static final java.util.List<AssetStepEntry> s_assets = new ArrayList<AssetStepEntry>(); private final Object[] m_vals; private final ContentType m_type; private final AuthoringKit m_kit; @@ -268,14 +270,19 @@ s_log.debug("skip step " + it.next()); } } - Iterator assets = s_assets.iterator(); + //Iterator assets = s_assets.iterator(); + Iterator<AssetStepEntry> assets = s_assets.iterator(); while (assets.hasNext()) { - Object[] data = (Object[]) assets.next(); - String baseObjectType = (String) data[0]; - Class step = (Class) data[1]; + //Object[] data = (Object[]) assets.next(); + final AssetStepEntry data = assets.next(); + //String baseObjectType = (String) data[0]; + final String baseObjectType = data.getBaseDataObjectType(); + //Class step = (Class) data[1]; + Class step = data.getStep(); s_log.debug("possibly adding asset step " + step.getName()); if (!skipSteps.contains(step.getName())) { - GlobalizedMessage label = (GlobalizedMessage) data[2]; + //GlobalizedMessage label = (GlobalizedMessage) data[2]; + GlobalizedMessage label = data.getLabel(); if (!thisType.isSubtypeOf(baseObjectType)) { continue; @@ -425,11 +432,17 @@ + " step class: " + step.getName()); - Iterator assets = s_assets.iterator(); + //Iterator assets = s_assets.iterator(); + Iterator<AssetStepEntry> assets = s_assets.iterator(); while (assets.hasNext()) { - Object[] data = (Object[]) assets.next(); - String thisObjectType = (String) data[0]; - GlobalizedMessage thisLabel = (GlobalizedMessage) data[2]; + //Object[] data = (Object[]) assets.next(); + //String thisObjectType = (String) data[0]; + //GlobalizedMessage thisLabel = (GlobalizedMessage) data[2]; + + final AssetStepEntry data = assets.next(); + String thisObjectType = data.getBaseDataObjectType(); + GlobalizedMessage thisLabel = data.getLabel(); + /** * jensp 2011-11-14: The code above was only testing for the same * label, but not for the same object type. I don't think that @@ -447,9 +460,83 @@ break; } } - s_assets.add(new Object[]{baseObjectType, step, label, description}); + s_assets.add(new AssetStepEntry(baseObjectType, step, label, description, sortKey)); + Collections.sort(s_assets); + //s_assets.add(new Object[]{baseObjectType, step, label, description}); } + private static class AssetStepEntry implements Comparable<AssetStepEntry> { + private String baseDataObjectType; + private Class step; + private GlobalizedMessage label; + private GlobalizedMessage description; + private Integer sortKey; + + public AssetStepEntry() { + super(); + } + + public AssetStepEntry(final String baseDataObjectType, + final Class step, + final GlobalizedMessage label, + final GlobalizedMessage description, + final Integer sortKey) { + this.baseDataObjectType = baseDataObjectType; + this.step = step; + this.label = label; + this.description = description; + this.sortKey = sortKey; + } + + public String getBaseDataObjectType() { + return baseDataObjectType; + } + + public void setBaseDataObjectType(final String baseDataObjectType) { + this.baseDataObjectType = baseDataObjectType; + } + + public Class getStep() { + return step; + } + + public void setStep(final Class step) { + this.step = step; + } + + public GlobalizedMessage getLabel() { + return label; + } + + public void setLabel(final GlobalizedMessage label) { + this.label = label; + } + + public GlobalizedMessage getDescription() { + return description; + } + + public void setDescription(final GlobalizedMessage description) { + this.description = description; + } + + public Integer getSortKey() { + return sortKey; + } + + public void setSortKey(final Integer sortKey) { + this.sortKey = sortKey; + } + + public int compareTo(final AssetStepEntry other) { + if (sortKey == other.getSortKey()) { + return step.getName().compareTo(other.getStep().getName()); + } else { + return sortKey.compareTo(other.getSortKey()); + } + } + } + /** * @return The content type handled by this wizard */ Modified: trunk/ccm-core/src/com/arsdigita/domain/xml/TraversalHandler.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/domain/xml/TraversalHandler.java 2013-02-02 16:40:47 UTC (rev 2463) +++ trunk/ccm-core/src/com/arsdigita/domain/xml/TraversalHandler.java 2013-02-02 17:23:03 UTC (rev 2464) @@ -66,8 +66,10 @@ m_adapters = new HashMap(); } + @Override public void characters(char[] ch, int start, int len) {} + @Override public void startElement(String uri, String localName, String qn, Attributes attrs) { if (!XMLNS.equals(uri)) { |
Author: pboy Date: 2013-02-02 16:40:47 +0000 (Sat, 02 Feb 2013) New Revision: 2463 Modified: trunk/ trunk/ccm-cms/src/com/arsdigita/cms/CMSConfig.java trunk/ccm-core/src/com/arsdigita/bebop/BebopConfig.java trunk/ccm-core/src/com/arsdigita/bebop/page/PageTransformer.java trunk/ccm-core/src/com/arsdigita/dispatcher/DispatcherConfig.java trunk/ccm-core/src/com/arsdigita/kernel/KernelConfig.java trunk/ccm-core/src/com/arsdigita/ui/UIConfig.java trunk/ccm-core/src/com/arsdigita/web/WebConfig.java trunk/ccm-forum/src/com/arsdigita/forum/ForumConfig.java trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/Initializer.java trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/Loader.java trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ObjectTypeTraversalAdapter.java trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/SimpleObjectTypeTraversalAdapter.java trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/WebAppPatternGenerator.java trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ui/ItemCategoryPicker.java trunk/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceConfig.java Log: Various minor formatting and documentation. Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - conf runtime build-projects.xml local.**.properties build.xml packages nbproject .ant-targets-build.xml .local.ccm.properties.swp .tmp.project.xml .tmp.applications.list .tmp.applications.list.swp .local.runtime.properties.swp .local.build.properties.swp .README.swp + conf runtime build-projects.xml local.**.properties build.xml packages nbproject Project** .ant-targets-build.xml .local.ccm.properties.swp .tmp.project.xml .tmp.applications.list .tmp.applications.list.swp .local.runtime.properties.swp .local.build.properties.swp ccm-lbc-** Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSConfig.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSConfig.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSConfig.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -120,7 +120,7 @@ "/default/folder.jsp"); /** * Path or the root folter for template folders. Path is relative to webapp - * root. + * root. Modify with care! Usually modified by developers only! */ private final Parameter m_templateRootPath = new StringParameter( Modified: trunk/ccm-core/src/com/arsdigita/bebop/BebopConfig.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/bebop/BebopConfig.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-core/src/com/arsdigita/bebop/BebopConfig.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -23,12 +23,12 @@ import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.templating.PresentationManager; import com.arsdigita.ui.SimplePage; +import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.ClassParameter; import com.arsdigita.util.parameter.EnumerationParameter; import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.SingletonParameter; import com.arsdigita.util.parameter.StringParameter; -import com.arsdigita.util.parameter.BooleanParameter; import org.apache.log4j.Logger; /** Modified: trunk/ccm-core/src/com/arsdigita/bebop/page/PageTransformer.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/bebop/page/PageTransformer.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-core/src/com/arsdigita/bebop/page/PageTransformer.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -19,14 +19,17 @@ package com.arsdigita.bebop.page; +import com.arsdigita.bebop.Bebop; import com.arsdigita.developersupport.DeveloperSupport; import com.arsdigita.dispatcher.DispatcherHelper; import com.arsdigita.globalization.Globalization; +import com.arsdigita.globalization.GlobalizationHelper; import com.arsdigita.kernel.Kernel; import com.arsdigita.profiler.Profiler; +import com.arsdigita.templating.PresentationManager; import com.arsdigita.templating.Templating; +import com.arsdigita.templating.XSLParameterGenerator; import com.arsdigita.templating.XSLTemplate; -import com.arsdigita.templating.PresentationManager; import com.arsdigita.util.Assert; import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.web.CachePolicy; @@ -34,34 +37,27 @@ import com.arsdigita.web.TransformationDebugger; import com.arsdigita.web.Web; import com.arsdigita.xml.Document; -import com.arsdigita.bebop.Bebop; -import com.arsdigita.globalization.GlobalizationHelper; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; - - import java.text.SimpleDateFormat; - +import java.util.Collection; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; +import java.util.Locale; import java.util.Map; -import java.util.HashMap; -import java.util.Collection; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.PageContext; - import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import com.arsdigita.templating.XSLParameterGenerator; -import java.util.Locale; import org.apache.log4j.Logger; /** @@ -322,9 +318,11 @@ // Get the stylesheet transformer object corresponding to the // current request. - final XSLTemplate template = Templating.getTemplate(req, - fancyErrors, !Boolean.TRUE. - equals(req.getAttribute(CACHE_XSL_NONE))); + final XSLTemplate template = Templating.getTemplate( + req, + fancyErrors, + !Boolean.TRUE.equals(req.getAttribute(CACHE_XSL_NONE)) + ); DeveloperSupport.endStage("PresMgr get stylesheet"); Modified: trunk/ccm-core/src/com/arsdigita/dispatcher/DispatcherConfig.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/dispatcher/DispatcherConfig.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-core/src/com/arsdigita/dispatcher/DispatcherConfig.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -19,9 +19,9 @@ package com.arsdigita.dispatcher; import com.arsdigita.runtime.AbstractConfig; +import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.IntegerParameter; import com.arsdigita.util.parameter.Parameter; -import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.StringParameter; import org.apache.log4j.Logger; @@ -33,9 +33,9 @@ private static final Logger s_log = Logger.getLogger(DispatcherConfig.class); - private final Parameter m_staticURLPrefix; private final Parameter m_cachingActive; private final Parameter m_defaultExpiry; + private final Parameter m_staticURLPrefix; /** Default top-level container for all Bebop components and containersPage * to use for dispatching Bebop pages. A custom installation may provide @@ -48,10 +48,6 @@ "com.arsdigita.bebop.Page"); public DispatcherConfig() { - m_staticURLPrefix = new StringParameter - ("waf.dispatcher.static_url_prefix", Parameter.REQUIRED, - "/STATICII/"); - m_cachingActive = new BooleanParameter ("waf.dispatcher.is_caching_active", Parameter.REQUIRED, Boolean.TRUE); @@ -61,6 +57,10 @@ ("waf.dispatcher.default_expiry", Parameter.REQUIRED, new Integer(259200)); + m_staticURLPrefix = new StringParameter + ("waf.dispatcher.static_url_prefix", Parameter.REQUIRED, + "/STATICII/"); + register(m_staticURLPrefix); register(m_cachingActive); register(m_defaultExpiry); Modified: trunk/ccm-core/src/com/arsdigita/kernel/KernelConfig.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/kernel/KernelConfig.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-core/src/com/arsdigita/kernel/KernelConfig.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -56,10 +56,10 @@ return s_conf; } - /** */ + /** TODO: should be renamed waf.kernel.debug" */ private static Parameter m_debug = new BooleanParameter ("waf.debug", Parameter.REQUIRED, Boolean.FALSE); - /** Whether WEB development support should be activated (true) or not. */ + /** Whether WEB development support should be activated (true) or not. */ // Handled in OLD initializer c.ad.webdevsupport.LegacyInitializer private static Parameter m_webdevSupport = new BooleanParameter ("waf.webdev_support", Parameter.REQUIRED, Boolean.FALSE); @@ -70,10 +70,21 @@ private final EnumerationParameter m_identifier = new EnumerationParameter ("waf.kernel.primary_user_identifier", Parameter.REQUIRED, "email"); - private final Parameter m_SSO; - private final Parameter m_remember; + /** + * */ + private final Parameter m_SSO = new BooleanParameter + ("waf.kernel.sso_login", Parameter.REQUIRED, Boolean.FALSE); + + /** + * */ + private final Parameter m_remember = new BooleanParameter + ("waf.kernel.remember_login", Parameter.REQUIRED, Boolean.TRUE); + + /** + * */ private final Parameter m_secureLogin = new BooleanParameter ("waf.kernel.secure_login", Parameter.REQUIRED, Boolean.FALSE); + /** String containing the supported languages. The first one is considered default. */ private final Parameter m_supportedLanguages = new StringParameter @@ -85,19 +96,16 @@ ("waf.kernel.language_independent_code", Parameter.OPTIONAL, "--"); + /** + * Constructor + */ public KernelConfig() { // Add recognised Login user identification to enumeration parameter m_identifier.put("email", "email"); m_identifier.put("screen_name", "screenName"); - - m_SSO = new BooleanParameter - ("waf.kernel.sso_login", Parameter.REQUIRED, Boolean.FALSE); + - m_remember = new BooleanParameter - ("waf.kernel.remember_login", Parameter.REQUIRED, Boolean.TRUE); - - register(m_debug); register(m_webdevSupport); register(m_permissions); Modified: trunk/ccm-core/src/com/arsdigita/ui/UIConfig.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/ui/UIConfig.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-core/src/com/arsdigita/ui/UIConfig.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -21,9 +21,9 @@ import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.util.StringUtils; +import com.arsdigita.util.parameter.Parameter; +import com.arsdigita.util.parameter.StringArrayParameter; import com.arsdigita.util.parameter.StringParameter; -import com.arsdigita.util.parameter.StringArrayParameter; -import com.arsdigita.util.parameter.Parameter; import java.util.Arrays; import java.util.ArrayList; Modified: trunk/ccm-core/src/com/arsdigita/web/WebConfig.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/web/WebConfig.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-core/src/com/arsdigita/web/WebConfig.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -202,7 +202,8 @@ * the <code>com.arsdigita.web.cache_policy</code> system property * using one fo the following values: <code>user</code> for * per-user caching, <code>world</code> for globally enabled - * caching, and <code>disable</code> to always prevent caching. + * caching, <code>disable</code> to prevent HTTP header caching, and + * <code>none</code>to always prevent caching in any case. */ public final CachePolicy getCachePolicy() { return (CachePolicy) get(m_policy); Modified: trunk/ccm-forum/src/com/arsdigita/forum/ForumConfig.java =================================================================== --- trunk/ccm-forum/src/com/arsdigita/forum/ForumConfig.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-forum/src/com/arsdigita/forum/ForumConfig.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -21,18 +21,15 @@ import com.arsdigita.kernel.User; import com.arsdigita.kernel.UserCollection; import com.arsdigita.runtime.AbstractConfig; -// import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.IntegerParameter; import com.arsdigita.util.parameter.Parameter; -import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.parameter.ResourceParameter; +import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.web.Web; import java.io.IOException; import java.io.InputStream; -// import java.net.MalformedURLException; -// import java.net.URL; import org.apache.log4j.Logger; Modified: trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/Initializer.java =================================================================== --- trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/Initializer.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/Initializer.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -19,12 +19,10 @@ package com.arsdigita.aplaws; import com.arsdigita.categorization.Categorization; +import com.arsdigita.london.terms.TermCategoryListener; import com.arsdigita.runtime.CompoundInitializer; import com.arsdigita.runtime.DomainInitEvent; import com.arsdigita.templating.PatternStylesheetResolver; - -import com.arsdigita.london.terms.TermCategoryListener; - import org.apache.log4j.Logger; Modified: trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/Loader.java =================================================================== --- trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/Loader.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/Loader.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -23,10 +23,10 @@ import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.SecurityManager; import com.arsdigita.cms.ui.role.RoleFactory; -import com.arsdigita.loader.PackageLoader; import com.arsdigita.kernel.Role; import com.arsdigita.kernel.RoleCollection; import com.arsdigita.kernel.permissions.PrivilegeDescriptor; +import com.arsdigita.loader.PackageLoader; import com.arsdigita.persistence.DataQuery; import com.arsdigita.runtime.ScriptContext; import com.arsdigita.util.Assert; Modified: trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ObjectTypeTraversalAdapter.java =================================================================== --- trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ObjectTypeTraversalAdapter.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ObjectTypeTraversalAdapter.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -18,8 +18,8 @@ package com.arsdigita.aplaws; +import com.arsdigita.persistence.metadata.ObjectType; import com.arsdigita.persistence.metadata.Property; -import com.arsdigita.persistence.metadata.ObjectType; // XXX this class is pretty similar to DomainObjectTraversal // and it would be nice to figure out a way to let them share Modified: trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/SimpleObjectTypeTraversalAdapter.java =================================================================== --- trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/SimpleObjectTypeTraversalAdapter.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/SimpleObjectTypeTraversalAdapter.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -18,10 +18,10 @@ package com.arsdigita.aplaws; -import org.apache.log4j.Logger; +import com.arsdigita.persistence.metadata.ObjectType; import com.arsdigita.persistence.metadata.Property; -import com.arsdigita.persistence.metadata.ObjectType; import java.util.HashSet; +import org.apache.log4j.Logger; /** * This is a general purpose traversal adaptor Modified: trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/WebAppPatternGenerator.java =================================================================== --- trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/WebAppPatternGenerator.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/WebAppPatternGenerator.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -30,7 +30,10 @@ /** * Generates a set of patterns corresponding to the current - * web application prefix + * web application prefix. + * + * It is a slight modification of + * {@see com.arsdigita.templating.WebAppPatternGenerator} */ public class WebAppPatternGenerator implements PatternGenerator { @@ -52,13 +55,14 @@ if (app == null || ctx == null || "".equals(ctx)) { - return new String[] { Web.ROOT_WEBAPP }; + return new String[] { Web.ROOT_WEBAPP }; } if (ctx.startsWith("/")) { ctx = ctx.substring(1); } - return new String[] { ctx }; + return new String[] { ctx }; // this version cuts ","+ Web.ROOT_WEBAPP + // as in c.a.templating.WebAppPatternGenerator } } Modified: trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ui/ItemCategoryPicker.java =================================================================== --- trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ui/ItemCategoryPicker.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-ldn-aplaws/src/com/arsdigita/aplaws/ui/ItemCategoryPicker.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -18,8 +18,6 @@ package com.arsdigita.aplaws.ui; -import org.apache.log4j.Logger; - import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.parameters.BigDecimalParameter; import com.arsdigita.bebop.parameters.StringParameter; @@ -31,9 +29,11 @@ import com.arsdigita.london.terms.ui.ACSObjectCategoryPicker; import com.arsdigita.london.terms.ui.TermWidget; +import org.apache.log4j.Logger; + /** * <p> cms specific Concrete implementation of - * <code>com.arsdigita.aplaws.ui.ACSObjectCategoryPicker</code>. </p> + * <code>com.arsdigita.london.terms.ui.ACSObjectCategoryPicker</code>. </p> * * * @@ -56,9 +56,9 @@ /* - * @see com.arsdigita.aplaws.ui.ACSObjectCategoryPicker#getForm( - com.arsdigita.bebop.parameters.BigDecimalParameter, - com.arsdigita.bebop.parameters.StringParameter) + * @see com.arsdigita.london.terms.ui.ACSObjectCategoryPicker#getForm( + * com.arsdigita.bebop.parameters.BigDecimalParameter, + * com.arsdigita.bebop.parameters.StringParameter) */ protected ACSObjectCategoryForm getForm(BigDecimalParameter root, StringParameter mode) { @@ -68,7 +68,7 @@ /* - * @see com.arsdigita.aplaws.ui.ACSObjectCategoryPicker#getObject() + * @see com.arsdigita.london.terms.ui.ACSObjectCategoryPicker#getObject() */ protected ACSObject getObject(PageState state) { ContentItem item = CMS.getContext().getContentItem(); Modified: trunk/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceConfig.java =================================================================== --- trunk/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceConfig.java 2013-02-02 16:35:31 UTC (rev 2462) +++ trunk/ccm-portalworkspace/src/com/arsdigita/portalworkspace/WorkspaceConfig.java 2013-02-02 16:40:47 UTC (rev 2463) @@ -22,9 +22,9 @@ import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.Parameter; +import com.arsdigita.util.parameter.ResourceParameter; import com.arsdigita.util.parameter.StringArrayParameter; import com.arsdigita.util.parameter.StringParameter; -import com.arsdigita.util.parameter.ResourceParameter; import java.io.InputStream; import java.util.Arrays; |
From: <pb...@fe...> - 2013-02-02 16:35:40
|
Author: pboy Date: 2013-02-02 16:35:31 +0000 (Sat, 02 Feb 2013) New Revision: 2462 Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/panels/Paginator.java trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicItemForm.java trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java Log: Length of property Name (URL) constrained to avoid very long names, fixed XML output, fixed paginator. Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/panels/Paginator.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/panels/Paginator.java 2013-02-02 14:07:58 UTC (rev 2461) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/panels/Paginator.java 2013-02-02 16:35:31 UTC (rev 2462) @@ -36,8 +36,7 @@ final int pageSize) { final String pageNumberStr = request.getParameter(PAGE_NUMBER); if (pageNumberStr == null) { - logger.debug("No pageNumber parameter in request setting page number" - + " to 1."); + logger.debug("No pageNumber parameter in request setting page number to 1."); pageNumber = 1; } else { pageNumber = Integer.parseInt(pageNumberStr); @@ -99,6 +98,18 @@ getEnd())); query.setRange(getBegin(), getEnd() + 1); } + + public <T> List<T> applyListLimits(final List<T> list, final Class<T> type) { + int begin = getBegin() - 1; + if (begin < 0) { + begin = 0; + } + int end = getEnd(); + if (end >= list.size()) { + end = list.size(); + } + return list.subList(begin, end); + } public int getPageCount() { return (int) Math.ceil((double) objectCount / (double) pageSize); Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicItemForm.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicItemForm.java 2013-02-02 14:07:58 UTC (rev 2461) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicItemForm.java 2013-02-02 16:35:31 UTC (rev 2462) @@ -179,11 +179,13 @@ add(new Label(getNameLabel())); TextField nameWidget = new TextField(new TrimmedStringParameter(NAME)); nameWidget.addValidationListener(new NameValidationListener()); + nameWidget.setMaxLength(190); nameWidget.setOnFocus("defaulting = false"); nameWidget.setOnBlur( "if (this.value == '') " + "{ defaulting = true; this.value = urlize(this.form." + TITLE + ".value) } " + " else { this.value = urlize(this.value); }"); + nameWidget.addValidationListener(new NotNullValidationListener()); add(nameWidget); } Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java 2013-02-02 14:07:58 UTC (rev 2461) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicPageForm.java 2013-02-02 16:35:31 UTC (rev 2462) @@ -142,6 +142,8 @@ @Override public void validate(final FormSectionEvent fse) throws FormProcessException { + super.validate(fse); + final ContentItem item = getItemSelectionModel().getSelectedItem(fse.getPageState()); ACSObject parent = item.getParent(); |
From: <pb...@fe...> - 2013-02-02 14:08:07
|
Author: pboy Date: 2013-02-02 14:07:58 +0000 (Sat, 02 Feb 2013) New Revision: 2461 Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitBundle.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonAliasDeleteForm.java trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java Log: Various fixes: * fixed ItemSearchFlatBrowser * Improved Alias handling * Fixed publication process for generic organisation content type * Added CreatePane to add members to projects etc. (on behalt of JensP) Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties 2013-02-02 14:07:58 UTC (rev 2461) @@ -1112,3 +1112,4 @@ cms.ui.clear=Clear cms.ui.item_search.create.folder_missing=No folder selected cms.ui.images_links= +cms.contenttypes.ui.person.alias.delete.label=Delete Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties 2013-02-02 14:07:58 UTC (rev 2461) @@ -1105,3 +1105,4 @@ cms.ui.type.minimummaximum_number_of_values_cannot_be_negative=Keine negativen Werte erlaubt cms.ui.item_search.create.folder_missing=kein Ordner ausgew\u00e4hlt cms.ui.images_links= +cms.contenttypes.ui.person.alias.delete.label= Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties 2013-02-02 14:07:58 UTC (rev 2461) @@ -51,3 +51,4 @@ cms.ui.clear= cms.ui.item_search.create.folder_missing= cms.ui.images_links= +cms.contenttypes.ui.person.alias.delete.label= Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties 2013-02-02 14:07:58 UTC (rev 2461) @@ -582,3 +582,4 @@ cms.ui.clear= cms.ui.item_search.create.folder_missing= cms.ui.images_links= +cms.contenttypes.ui.person.alias.delete.label= Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties 2013-02-02 14:07:58 UTC (rev 2461) @@ -145,3 +145,5 @@ cms.contenttypes.ui.person.select_contact.no_contact_selected=No contact selected. cms.contenttypes.ui.person.select_contact.no_suitable_language_variant=The selected contact item is not avilable in the language of the current item. cms.contenttypes.ui.person.select_contact.already_added=The selected contact has already been added to current item. +cms.contenttypes.ui.person.alias.delete.label=Delete +cms.contenttypes.ui.person.alias.delete.confirm=Are you sure to remove the alias? Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties 2013-02-02 14:07:58 UTC (rev 2461) @@ -156,3 +156,5 @@ cms.contenttypes.ui.person.select_contact.no_contact_selected=Kein Kontakt ausgew\u00e4hlt. cms.contenttypes.ui.person.select_contact.no_suitable_language_variant=Das ausgew\u00e4hlte Kontakt-Item ist nicht in der Sprache des aktuellen Items verf\u00fcgbar. cms.contenttypes.ui.person.select_contact.already_added=Das ausgew\u00e4hlte Kontakt-Item wurde dem aktuellen Item bereits hinzugef\u00fcgt. +cms.contenttypes.ui.person.alias.delete.label=L\u00f6schen +cms.contenttypes.ui.person.alias.delete.confirm=Sind Sie sicher, dass Sie das Alias entfernen wollen? Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitBundle.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitBundle.java 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitBundle.java 2013-02-02 14:07:58 UTC (rev 2461) @@ -355,7 +355,7 @@ link.set( GenericOrganizationalUnitSuperiorCollection.SUPERIOR_ORGAUNIT_ORDER, subOrgaUnits.get( - GenericOrganizationalUnitSuperiorCollection.SUPERIOR_ORGAUNIT_ORDER)); + GenericOrganizationalUnitSuperiorCollection.LINK_SUPERIOR_ORGAUNIT_ORDER)); link.save(); } Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java 2013-02-02 14:07:58 UTC (rev 2461) @@ -81,7 +81,7 @@ findByAssociatedObjectType(getPersonType())); /*m_itemSearch.getItemField().addValidationListener( new NotNullValidationListener());*/ - m_itemSearch.setDisableCreatePane(true); + m_itemSearch.setDisableCreatePane(false); add(this.m_itemSearch); selectedPersonNameLabel = new Label(""); Modified: trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonAliasDeleteForm.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonAliasDeleteForm.java 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonAliasDeleteForm.java 2013-02-02 14:07:58 UTC (rev 2461) @@ -30,16 +30,18 @@ final GenericPersonAliasPropertiesStep step) { super(ID, itemModel); addSaveCancelSection(); + addProcessListener(this); } @Override public void addWidgets() { add(new Label((String) ContenttypesGlobalizationUtil.globalize( - "cms.contenttypes.ui.person.alias.delete.label").localize())); + "cms.contenttypes.ui.person.alias.delete.confirm").localize())); } @Override public void init(final FormSectionEvent fse) throws FormProcessException { + //Nothing } @Override @@ -51,6 +53,11 @@ person.unsetAlias(); } } + + @Override + public void validate(final FormSectionEvent event) throws FormProcessException { + //Nothing + } @Override public void addSaveCancelSection() { Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java 2013-02-02 13:53:24 UTC (rev 2460) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchFlatBrowsePane.java 2013-02-02 14:07:58 UTC (rev 2461) @@ -182,6 +182,7 @@ collection.set(state, session.retrieve(type.getClassName())); } ((DataCollection)collection.get(state)).addFilter("version = 'draft'"); + ((DataCollection)collection.get(state)).addFilter("section is not null"); final String query = (String) state.getValue(queryParam); if ((query != null) && !query.isEmpty()) { |
From: <pb...@fe...> - 2013-02-02 13:53:31
|
Author: pboy Date: 2013-02-02 13:53:24 +0000 (Sat, 02 Feb 2013) New Revision: 2460 Modified: trunk/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql Log: Fixed update script (removed core admin sitemap, which no longer works because all sitenodes are rfeplaced by new style apps). (On behalf of JensP) Modified: trunk/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql =================================================================== --- trunk/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql 2013-02-02 13:51:41 UTC (rev 2459) +++ trunk/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql 2013-02-02 13:53:24 UTC (rev 2460) @@ -135,3 +135,24 @@ -- functionality and is removed. -- New, legacy free application works without a (dummy) Application table drop table sitemap_app ; + +delete from applications + where application_type_id = + (select application_type_id from application_types + where object_type like '%sitemap.SiteMap%'); + +delete from object_container_map + where object_id = + (select object_id from acs_objects + where object_type like '%sitemap.SiteMap%'); + +delete from object_context + where object_id = + (select object_id from acs_objects + where object_type like '%sitemap.SiteMap%'); + +delete from acs_objects + where object_type like '%sitemap.SiteMap%'; + +delete from application_types + where object_type like '%sitemap.SiteMap%'; \ No newline at end of file |
From: <pb...@fe...> - 2013-02-02 13:51:49
|
Author: pboy Date: 2013-02-02 13:51:41 +0000 (Sat, 02 Feb 2013) New Revision: 2459 Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties trunk/ccm-cms/src/com/arsdigita/cms/ui/ImageDisplay.java trunk/ccm-cms/src/com/arsdigita/cms/ui/ImagesPane.java Log: Improved new image tab: fixed event handling, fixed upload of imnages. (On behalf of Quasimodo) Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties 2013-02-02 13:50:29 UTC (rev 2458) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources.properties 2013-02-02 13:51:41 UTC (rev 2459) @@ -1111,3 +1111,4 @@ cms.ui.clear=Clear cms.ui.item_search.create.folder_missing=No folder selected +cms.ui.images_links= Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties 2013-02-02 13:50:29 UTC (rev 2458) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties 2013-02-02 13:51:41 UTC (rev 2459) @@ -1104,3 +1104,4 @@ cms.ui.type.minimum_number_of_values_bigger_than_maximum_number_of_values=Maximaler Wert kleiner als minimaler Wert cms.ui.type.minimummaximum_number_of_values_cannot_be_negative=Keine negativen Werte erlaubt cms.ui.item_search.create.folder_missing=kein Ordner ausgew\u00e4hlt +cms.ui.images_links= Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties 2013-02-02 13:50:29 UTC (rev 2458) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties 2013-02-02 13:51:41 UTC (rev 2459) @@ -50,3 +50,4 @@ cms.ui.clear= cms.ui.item_search.create.folder_missing= +cms.ui.images_links= Modified: trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties 2013-02-02 13:50:29 UTC (rev 2458) +++ trunk/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties 2013-02-02 13:51:41 UTC (rev 2459) @@ -67,7 +67,7 @@ cms.contenttypes.ui.there_are_no_events=Il n'y a aucun \u00e9venement cms.contenttypes.ui.title=Titre cms.contenttypes.ui.view_image=voir l'image - + # Package com.arsdigita.cms.dispatcher # ===================================== cms.dispatcher.cannot_find_domain_object=Impossible de trouver le domaine objet @@ -77,7 +77,7 @@ cms.dispatcher.not_implemented=Non impl\u00e9ment\u00e9 cms.dispatcher.unknown_context=Contexte inconnu - + # Package com.arsdigita.cms.formbuilder # ===================================== cms.formbuilder.cannot_create_acsobject=Impossible de cr\u00e9er l'ACSObject @@ -86,13 +86,13 @@ cms.formbuilder.roll_me_back=TRANSLATE THIS: Roll me back (cms.formbuilder.roll_me_back) cms.formbuilder.css=Cascading Style Sheet (CSS) Class Attribute - + # Package com.arsdigita.cms.installer # ===================================== cms.installer.approval=Approbation cms.installer.article=Article cms.installer.authoring=Ecriture -cms.installer.cannot_find_cms_package_type=Impossible de trouver le type package CMS +cms.installer.cannot_find_cms_package_type=Impossible de trouver le type package CMS cms.installer.cannot_find_content_type=Impossible de trouver le type de contenu cms.installer.cannot_find_file=Impossible de trouver le fichier cms.installer.cannot_find_group_for_email=Impossible de trouver le groupe pour l'email @@ -109,7 +109,7 @@ cms.installer.simple_publication=Publication simple cms.installer.template=Gabarit - + # Package com.arsdigita.cms.lifecycle # =================================== cms.lifecycle.could_not_fetch_lifecycle=Impossible de trouver le cycle de vie @@ -135,10 +135,10 @@ cms.publishToFile.publish_to_file_setlocalrequestpassword_could_not_be_created=La publication du fichier pour la demande de mot de passe ne peut pas \u00eatre cr\u00e9\u00e9e cms.publishToFile.publishsource_sourcebase_must_end_in_=L'\u00e9dition source doit se terminer par '/' cms.publishToFile.server=Server -cms.publishToFile.unable_to_find_closing_for_tag=Impossible de trouver '>' pour la fermeture du tag +cms.publishToFile.unable_to_find_closing_for_tag=Impossible de trouver '>' pour la fermeture du tag cms.publishToFile.unable_to_get_contentitem=Impossible de trouve le contenu de l'\u00e9l\u00e9ment - + # Package com.arsdigita.cms.ui # ============================ cms.ui.actions=actions @@ -196,7 +196,7 @@ cms.ui.no_items_matched_the_search=Pas d'\u00e9l\u00e9ment trouv\u00e9 dans la recherche - + # Package com.arsdigita.cms.ui.authoring # ====================================== cms.ui.authoring.an_item_with_this_name_already_exists=Un \u00e9l\u00e9ment de ce nom existe d\u00e9j\u00e0 @@ -236,12 +236,12 @@ cms.ui.authoring.upload_image=T\u00e9l\u00e9charger l'image cms.ui.authoring.workflow=TRANSLATE THIS: Select a Workflow (cms.ui.authoring.workflow) - + # Package com.arsdigita.cms.ui.authoringkit # ========================================= cms.ui.authoringkit.authoring_kit_for=Kit d'\u00e9criture pour cms.ui.authoringkit.component=Composant -cms.ui.authoringkit.content_type_id=Type de contenu ID# +cms.ui.authoringkit.content_type_id=Type de contenu ID# cms.ui.authoringkit.create_component=Cr\u00e9er le composant cms.ui.authoringkit.createcomponent=Cr\u00e9er le composant cms.ui.authoringkit.current_row_does_not_exists=La ligne en cours n'exsite pas @@ -251,7 +251,7 @@ cms.ui.authoringkit.ordering=Commande cms.ui.authoringkit.submission_cancelled=Soumission annul\u00e9e - + # Package com.arsdigita.cms.ui.category # ===================================== cms.ui.category.add_a_subcategory=Ajouter une sous-rubrique @@ -294,7 +294,7 @@ cms.ui.category.url=URL # cms.ui.category.use_custom_permissions=Utiliser les droits personnalis\u00e9s - + # Package com.arsdigita.cms.ui.cse # ================================ cms.ui.cse.authorName=Author @@ -305,17 +305,17 @@ cms.ui.cse.editLink=edit cms.ui.cse.endDateTime=Live Until - + # Package com.arsdigita.cms.ui.folder # =================================== cms.ui.folder.cancelled=Annul\u00e9 cms.ui.folder.cannot_find_a_root_folder=Impossible de trouver le r\u00e9pertoire racine -cms.ui.folder.na=N/A +cms.ui.folder.na=N/A cms.ui.folder.no_source_items_specified=Pas d'\u00e9l\u00e9ment source sp\u00e9cifi\u00e9 cms.ui.folder.parent=Parent Folder cms.ui.folder.rename=Rename folder - + # Package com.arsdigita.cms.ui.formbuilder # ======================================== cms.ui.formbuilder.description=Description @@ -323,7 +323,7 @@ cms.ui.formbuilder.oh_no_you_dont=non, vous ne pouvez pas cms.ui.formbuilder.title=Titre - + # Package com.arsdigita.cms.ui.item # ================================= cms.ui.item.access_denied=Acc\u00e8s refus\u00e9 @@ -345,7 +345,7 @@ cms.ui.item.the_current_row_does_not_exists=La ligne en cours n'exsite pas cms.ui.item.unpublish=D\u00e9publier - + # Package com.arsdigita.cms.ui.lifecycle # ====================================== cms.ui.lifecycle.add=Create new lifecycle @@ -372,7 +372,7 @@ cms.ui.lifecycle.phases=Etapes cms.ui.lifecycle.start_delay=D\u00e9lai de d\u00e9but - + # Package com.arsdigita.cms.ui.permissions # ======================================== cms.ui.permissions.add_administrator=Ajouter un administrateur @@ -421,7 +421,7 @@ cms.ui.staff.no_usersgroups_were_selected=Pas d'utilisateur/groupe s\u00e9l\u00e9ctionn\u00e9 cms.ui.staff.not_a_role_adminstrator=Pas d'administrateur de r\u00f4le cms.ui.staff.not_an_administrator_for_roles=pas un administrateur pour les r\u00f4les -cms.ui.staff.not_an_administrator_for_this_role=pas un administrateur pour ce r\u00f4le +cms.ui.staff.not_an_administrator_for_this_role=pas un administrateur pour ce r\u00f4le cms.ui.staff.out_of_bounds=En dehors de la plage cms.ui.staff.privileges=Droits accord\u00e9s cms.ui.staff.privileges=Droits accord\u00e9s @@ -581,3 +581,4 @@ cms.ui.clear= cms.ui.item_search.create.folder_missing= +cms.ui.images_links= Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/ImageDisplay.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/ImageDisplay.java 2013-02-02 13:50:29 UTC (rev 2458) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/ImageDisplay.java 2013-02-02 13:51:41 UTC (rev 2459) @@ -24,12 +24,10 @@ import com.arsdigita.cms.ImageAsset; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.Service; -// import com.arsdigita.cms.dispatcher.Utilities; import com.arsdigita.mimetypes.MimeType; import com.arsdigita.util.Assert; import com.arsdigita.web.URL; import com.arsdigita.xml.Element; - import java.math.BigDecimal; Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/ImagesPane.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/ImagesPane.java 2013-02-02 13:50:29 UTC (rev 2458) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/ImagesPane.java 2013-02-02 13:51:41 UTC (rev 2459) @@ -5,6 +5,7 @@ package com.arsdigita.cms.ui; import com.arsdigita.bebop.Component; +import com.arsdigita.bebop.FormModel; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.List; import com.arsdigita.bebop.ListPanel; @@ -16,16 +17,17 @@ import com.arsdigita.bebop.SegmentedPanel; import com.arsdigita.bebop.SegmentedPanel.Segment; import com.arsdigita.bebop.SimpleContainer; -import com.arsdigita.bebop.SingleSelectionModel; import com.arsdigita.bebop.event.ChangeEvent; import com.arsdigita.bebop.event.ChangeListener; import com.arsdigita.bebop.list.ListModel; import com.arsdigita.bebop.list.ListModelBuilder; +import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.toolbox.ui.ActionGroup; import com.arsdigita.toolbox.ui.LayoutPanel; import com.arsdigita.toolbox.ui.Section; +import com.arsdigita.util.Assert; import com.arsdigita.util.LockableImpl; import java.util.ArrayList; import java.util.HashMap; @@ -47,14 +49,15 @@ private ListPanel m_listPanel; final private SegmentedPanel m_body; private HashMap<String, Segment> m_bodySegments = new HashMap(); - private final SingleSelectionModel m_model; + private final ResettableParameterSingleSelectionModel m_model; private final List m_links; + private final LinksSection m_modes; public ImagesPane() { super(); - m_model = new ParameterSingleSelectionModel(new StringParameter(List.SELECTED)); - + m_model = new ResettableParameterSingleSelectionModel(new StringParameter(List.SELECTED)); + m_model.setDefaultSelection(ImageComponent.LIBRARY); m_model.addChangeListener(new ImageAdminSelectionListener()); m_links = new List(new ImageAdminListModelBuilder()); @@ -63,8 +66,8 @@ final SimpleContainer left = new SimpleContainer(); setLeft(left); - final LinksSection staff = new LinksSection(); - left.add(staff); + m_modes = new LinksSection(); + left.add(m_modes); m_body = new SegmentedPanel(); setBody(m_body); @@ -81,7 +84,6 @@ final ImageLibraryComponent library = new ImageLibraryComponent(ImageComponent.ADMIN_IMAGES); library.getForm().addInitListener(m_adminListener); library.getForm().addProcessListener(m_adminListener); - library.addUploadLink(m_adminListener); selectors.put(ImageComponent.LIBRARY, library); m_bodySegments.put(ImageComponent.LIBRARY, m_body.addSegment( new Label(GlobalizationUtil.globalize("cms.ui.image_library")), @@ -107,69 +109,77 @@ while (keys.hasNext()) { String key = keys.next(); - page.setVisibleDefault(m_bodySegments.get(key), ImageComponent.LIBRARY.equals(key)); -// for (int index = 0; index < m_bodySegments.get(key).size(); index++) { - -// Component component = m_bodySegments.get(key).get(index); -// page.setVisibleDefault(component, ImageComponent.LIBRARY.equals(key)); -// } + page.setVisibleDefault(m_bodySegments.get(key), m_model.getDefaultSelection().equals(key)); } - // final Map componentsMap = m_imageComponent.getComponentsMap(); - // - // final Iterator keyIter = componentsMap.keySet().iterator(); - // while (keyIter.hasNext()) { - // final Object key = keyIter.next(); - // final Component component = (Component) componentsMap.get(key); - // - // page.setVisibleDefault(component, ImageComponent.LIBRARY.equals(key)); - // } - // page.addComponentStateParam(this, m_imageComponentKey); } /** * Resets this pane and all its resettable components. - * + * * @param state Page state */ @Override public final void reset(final PageState state) { super.reset(state); + m_model.reset(state); + this.setActiveImageComponent(state, m_model.getDefaultSelection()); + } + + public final void setActiveImageComponent(PageState state, String activeComp) { + Iterator<String> keys = m_bodySegments.keySet().iterator(); + m_imageComponent.setSelectedKey(state, activeComp); while (keys.hasNext()) { + String key = keys.next(); - state.setVisible(m_bodySegments.get(key), ImageComponent.LIBRARY.equals(key)); + final boolean visibility = key.equals(activeComp); + state.setVisible(m_bodySegments.get(key), visibility); for (int index = 0; index < m_bodySegments.get(key).size(); index++) { Component component = m_bodySegments.get(key).get(index); -// state.setVisible(component, ImageComponent.LIBRARY.equals(key)); + // Reset all components if they are of type Resettable - if (component instanceof Resettable) { ((Resettable) component).reset(state); } + + // Set visibility + component.setVisible(state, visibility); } } + } + private class ResettableParameterSingleSelectionModel extends ParameterSingleSelectionModel + implements Resettable { -// final Map componentsMap = m_imageComponent.getComponentsMap(); -// m_imageComponent.setSelectedKey(state, ImageComponent.LIBRARY); -// final Iterator keyIter = componentsMap.keySet().iterator(); -// while (keyIter.hasNext()) { -// final Object key = keyIter.next(); -// final Component component = (Component) componentsMap.get(key); -// -// state.setVisible(component, ImageComponent.LIBRARY.equals(key)); -// -// // Reset all components if they are of type Resettable -// if (component instanceof Resettable) { -// ((Resettable) component).reset(state); -// } -// } + private String defaultKey; + + public ResettableParameterSingleSelectionModel(ParameterModel m) { + super(m); + } + + public void setDefaultSelection(String selKey) { + this.defaultKey = selKey; + } + + public String getDefaultSelection() { + return defaultKey; + } + + public void reset(PageState state) { + + if (Assert.isEnabled()) { + final FormModel model = state.getPage().getStateModel(); + Assert.isTrue(model.containsFormParam(getStateParameter())); + } + + state.setValue(getStateParameter(), this.defaultKey); + } } private class ImageAdminListModel implements ListModel { @@ -212,13 +222,13 @@ final PageState state = e.getPageState(); -// getBody().reset(state); +// ImagesPane.this.reset(state); if (m_model.isSelected(state)) { S_LOG.debug("The selection model is selected; displaying " + "the item pane"); -// getBody().push(state, getItemPane()); + ImagesPane.this.setActiveImageComponent(state, state.getControlEventValue()); } } } @@ -234,4 +244,4 @@ group.setSubject(m_links); } } -} +} \ No newline at end of file |
From: <pb...@fe...> - 2013-02-02 13:50:38
|
Author: pboy Date: 2013-02-02 13:50:29 +0000 (Sat, 02 Feb 2013) New Revision: 2458 Modified: trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig_parameter.properties Log: Parameter nbame adjusted. (On behalf of Quasimodo) Modified: trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java =================================================================== --- trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java 2013-02-02 13:49:11 UTC (rev 2457) +++ trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig.java 2013-02-02 13:50:29 UTC (rev 2458) @@ -96,8 +96,8 @@ requests 'all graphics files' */ private final Parameter m_fileExtParam = new StringParameter - ("themedirector.graphics_file_extensions", - Parameter.REQUIRED, "bmp css gif jpeg jpg js png xml xsl"); + ("themedirector.file_extensions", + Parameter.REQUIRED, "bmp css eot gif jpeg jpg js png svg ttf woff xml xsl"); /** number of seconds before checking for updated development files. in a multi-jvm installation. (0 means never start) */ Modified: trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig_parameter.properties =================================================================== --- trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig_parameter.properties 2013-02-02 13:49:11 UTC (rev 2457) +++ trunk/ccm-themedirector/src/com/arsdigita/themedirector/ThemeDirectorConfig_parameter.properties 2013-02-02 13:50:29 UTC (rev 2458) @@ -13,10 +13,10 @@ themedirector.default_theme_manifest.example=[ccm-themedirectory.web.mf] themedirector.default_theme_manifest.format=[string] -themedirector.graphics_file_extensions.title=Graphics File Extensions (Themes) -themedirector.graphics_file_extensions.purpose=A list of file extensions that should be included when the designer requests 'all graphics files' -themedirector.graphics_file_extensions.example=css gif jpeg jpg js png xsl -themedirector.graphics_file_extensions.format=[string] +themedirector.file_extensions.title=Theme File Extensions (Themes) +themedirector.file_extensions.purpose=A list of file extensions that should be included when the designer requests 'all graphics files' +themedirector.file_extensions.example=css gif eot jpeg jpg js png svg ttf woff xsl xml +themedirector.file_extensions.format=[string] themedirector.default_theme_dir.title=The path to the default themes directory (Themes Application) themedirector.default_theme_dir.purpose=This is the path to the defalut themes directory. When a new "theme" is created, this directory is copied and the new directory is the base for the new themes. It is provided relative to the "webapps" directory. |
From: <pb...@fe...> - 2013-02-02 13:49:20
|
Author: pboy Date: 2013-02-02 13:49:11 +0000 (Sat, 02 Feb 2013) New Revision: 2457 Modified: trunk/tools-ng/ecdc/scriptlib/build-ccm.xml Log: Improved ccm-run, enabled CLI debugging. (On behalf of JensP) Modified: trunk/tools-ng/ecdc/scriptlib/build-ccm.xml =================================================================== --- trunk/tools-ng/ecdc/scriptlib/build-ccm.xml 2013-01-23 14:11:03 UTC (rev 2456) +++ trunk/tools-ng/ecdc/scriptlib/build-ccm.xml 2013-02-02 13:49:11 UTC (rev 2457) @@ -260,6 +260,20 @@ <target name="ccm-run"> <echo>ccm-run ${ccm.classname} ${ccm.parameters}</echo> + + <if> + <equals arg1="${app.server.debug.on}" arg2="true" /> + <then> + <property name="app.server.debugger" + value="-agentlib:jdwp=transport=dt_socket,server=y,address=${app.server.debug.port},suspend=${app.server.debug.suspend}" /> + </then> + <else> + <!-- dummy value required to start tomcat successfully --> + <property name="app.server.debugger" + value="-showversion" /> + </else> + </if> + <java classname="${ccm.classname}" fork="yes"> <classpath> <path refid="ccm.tools.classpath" /> @@ -267,6 +281,7 @@ <fileset dir="${app.server.webapp.dir}/ROOT/WEB-INF/lib" includes="**/*.jar" /> </classpath> <sysproperty key="ccm.home" value="${ccm.home}" /> + <jvmarg value="${app.server.debugger}" /> <arg line="${ccm.parameters}" /> </java> </target> |
Author: pboy Date: 2013-01-23 14:11:03 +0000 (Wed, 23 Jan 2013) New Revision: 2456 Modified: contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/integration.properties contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/project.xml contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/web.xml contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden400.jsp contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden404.jsp contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden500.jsp contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ccm-navigation/navigation/camden-default.jsp contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml contrib/camden/ccm-lbc-aplaws/bundles/intranet/templates/ERROR/404.jsp contrib/camden/ccm-lbc-aplaws/bundles/intranet/templates/ERROR/500.jsp contrib/camden/ccm-lbc-aplaws/bundles/public/cfg/integration.properties contrib/camden/ccm-lbc-aplaws/bundles/public/cfg/web.xml contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden400.jsp contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden404.jsp contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden500.jsp Log: Modified according to code changes in ccm-cms and ccm-core. Modified: contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/integration.properties =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/integration.properties 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/integration.properties 2013-01-23 14:11:03 UTC (rev 2456) @@ -60,10 +60,11 @@ # CORE UI configuration parameters # ############################################################################## -core.ui.pagemap.root_page_url=portal/ -core.ui.pagemap.workspace_url=portal/ -core.ui.pagemap.user_redirect_url=content-center/redirect.jsp -# With versin 2 moved from kernel/security to ui rsp ui.permissions and +core.ui.pagemap.root_page_url=/portal/ +#core.ui.pagemap.user_redirect_url=content-center/redirect.jsp +core.ui.pagemap.user_redirect_url=/content-center/ +core.ui.pagemap.workspace_url=/portal/ +# With version 2 moved from kernel/security to ui rsp ui.permissions and # no longer intended to be user configurable. # TODO CHECK what these URLS (esp. ../one) is used for. # waf.pagemap.permission=permissions/ ; DEFAULT @@ -101,7 +102,8 @@ # list the desired content section names #com.arsdigita.cms.loader.section_names=generic,openccm,homepages -com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker +# Replace CMS category form with a terms specific widget +com.arsdigita.cms.category_authoring_add_form=com.arsdigita.london.terms.ui.ItemCategoryPicker # Check parameter, not part of CMSConfig com.arsdigita.cms.check_bcc=ess...@ca... Modified: contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/project.xml =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/project.xml 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/project.xml 2013-01-23 14:11:03 UTC (rev 2456) @@ -106,13 +106,14 @@ <ccm:application name="ccm-ldn-importer"/> <!-- Devel Bundle's LBC Content Types --> + <ccm:application name="ccm-lbc-consultation"/> <!-- - <ccm:application name="ccm-lbc-consultation"/> <ccm:application name="ccm-lbc-contentcheck"/> --> + <ccm:application name="ccm-lbc-decisiontree"/> <ccm:application name="ccm-lbc-eforms"/> + <ccm:application name="ccm-lbc-foi"/> <!-- - <ccm:application name="ccm-lbc-foi"/> <ccm:application name="ccm-lbc-wordxml"/> --> @@ -140,12 +141,13 @@ <!-- ADD-ONs Bundle's Applications --> <!-- + <ccm:application name="ccm-auth-http"/> --> - <ccm:application name="ccm-auth-http"/> <ccm:application name="ccm-bookmarks"/> <ccm:application name="ccm-docrepo"/> <ccm:application name="ccm-faq"/> <ccm:application name="ccm-forum-categorised"/> + <ccm:application name="ccm-portalserver"/> <!-- currently doesn't work for unknown reason <ccm:application name="ccm-simplesurvey"/> --> Modified: contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/web.xml =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/web.xml 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/devel/cfg/web.xml 2013-01-23 14:11:03 UTC (rev 2456) @@ -143,7 +143,7 @@ <servlet> <servlet-name>content-center</servlet-name> - <servlet-class>com.arsdigita.cms.WorkspaceServlet</servlet-class> + <servlet-class>com.arsdigita.cms.ContentCenterServlet</servlet-class> </servlet> <servlet> @@ -195,52 +195,7 @@ </init-param> </servlet> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Camden viewing options - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <servlet> - <servlet-name>LargeTextServlet</servlet-name> - <display-name>Large Text Output Servlet</display-name> - <servlet-class> - com.arsdigita.web.InternalPrefixerServlet - </servlet-class> - <init-param> - <param-name>prefix</param-name> - <param-value>/large</param-value> - </init-param> - </servlet> - - <servlet> - <servlet-name>LargeLinearTextServlet</servlet-name> - <display-name>Large Linear Text Output Servlet</display-name> - <servlet-class> - com.arsdigita.web.InternalPrefixerServlet - </servlet-class> - <init-param> - <param-name>prefix</param-name> - <param-value>/linear</param-value> - </init-param> - </servlet> - - <servlet> - <servlet-name>HighContrastLinearTextServlet</servlet-name> - <display-name>High Contrast Linear Text Output Servlet</display-name> - <servlet-class> - com.arsdigita.web.InternalPrefixerServlet - </servlet-class> - <init-param> - <param-name>prefix</param-name> - <param-value>/zoom</param-value> - </init-param> - </servlet> -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Camden viewing options END - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - - - -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MODULES SERVLET DECLARATIONS SECTION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> @@ -580,25 +535,6 @@ <url-pattern>/print/*</url-pattern> </servlet-mapping> - - <!-- viewing option servlet mapping --> - <servlet-mapping> - <servlet-name>LargeTextServlet</servlet-name> - <url-pattern>/large/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>LargeLinearTextServlet</servlet-name> - <url-pattern>/linear/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>HighContrastLinearTextServlet</servlet-name> - <url-pattern>/zoom/*</url-pattern> - </servlet-mapping> - <!--// end viewing option servlet mapping // --> - - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ERROR PAGES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> Modified: contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden400.jsp =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden400.jsp 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden400.jsp 2013-01-23 14:11:03 UTC (rev 2456) @@ -1,7 +1,8 @@ <%@ page isErrorPage="true" import="com.arsdigita.dispatcher.DispatcherHelper, - com.arsdigita.sitenode.ServletErrorReport, - com.arsdigita.web.Web, com.arsdigita.web.URL" %> + com.arsdigita.web.ServletErrorReport, + com.arsdigita.web.Web, + com.arsdigita.web.URL" %> <%DispatcherHelper.forceCacheDisable(response);%> <%-- NB. The above cacheDisable command must be on the first line of the jsp Modified: contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden404.jsp =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden404.jsp 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden404.jsp 2013-01-23 14:11:03 UTC (rev 2456) @@ -1,7 +1,8 @@ <%@ page isErrorPage="true" import="com.arsdigita.dispatcher.DispatcherHelper, -com.arsdigita.sitenode.ServletErrorReport, -com.arsdigita.web.Web, com.arsdigita.web.URL" %> + com.arsdigita.web.ServletErrorReport, + com.arsdigita.web.Web, + com.arsdigita.web.URL" %> <%DispatcherHelper.forceCacheDisable(response);%> <%-- NB. The above cacheDisable command must be on the first line of the jsp @@ -11,7 +12,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>404 Page not found - Camden Council</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" /> <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" /> @@ -42,9 +43,9 @@ <meta name="DC.rights" lang="en" content="Copyright Camden Council 2004" /> <meta name="DCTERMS.audience" content="" scheme="LGAL" /> <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://www.camden.gov.uk" r (nz 1 vz 1 lz 1 oz 1 cz 1) gen true for "http://www3.camden.gov.uk" r (nz 1 vz 1 lz 1 oz 1 cz 1))' /> - <link rel="shortcut icon" href="/ccm-ldn-theme/__ccm__/themes-prod/fc-sw2/images/icons/favicon.ico" /> + <link rel="shortcut icon" href="/ccm-ldn-theme/__ccm__/themes-prod/fc-sw2/images/icons/favicon.ico" /> - <link media="screen, projection, print" type="text/css" rel="stylesheet" + <link media="screen, projection, print" type="text/css" rel="stylesheet" href="/ccm-ldn-theme/__ccm__/themes-prod/fc-sw2/css/yui_reset.css"/> <link media="screen, projection" type="text/css" rel="stylesheet" href="/ccm-ldn-theme/__ccm__/themes-prod/fc-sw2/css/screen.min.css"/> Modified: contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden500.jsp =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden500.jsp 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ERROR/camden500.jsp 2013-01-23 14:11:03 UTC (rev 2456) @@ -1,7 +1,8 @@ <%@ page isErrorPage="true" import="com.arsdigita.dispatcher.DispatcherHelper, - com.arsdigita.sitenode.ServletErrorReport, - com.arsdigita.web.Web, com.arsdigita.web.URL" %> + com.arsdigita.web.ServletErrorReport, + com.arsdigita.web.Web, + com.arsdigita.web.URL" %> <%DispatcherHelper.forceCacheDisable(response);%> <%-- NB. The above cacheDisable command must be on the first line of the jsp Modified: contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ccm-navigation/navigation/camden-default.jsp =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ccm-navigation/navigation/camden-default.jsp 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/devel/templates/ccm-navigation/navigation/camden-default.jsp 2013-01-23 14:11:03 UTC (rev 2456) @@ -39,11 +39,12 @@ <jsp:scriptlet> DataCollection pub = SessionManager.getSession().retrieve("com.arsdigita.categorization.Category"); - pub.addEqualsFilter("name", "CMSAnnouncements"); +// pub.addEqualsFilter("name", "CMSAnnouncements"); + pub.addEqualsFilter("name", "Business"); if(!pub.isEmpty()) { pub.next(); DataObject obj = pub.getDataObject(); - System.out.println(obj.toString()); +// System.out.println(obj.toString()); pub.close(); CategoryDataCollectionDefinition categoryDataCollectionDefinition = new CategoryDataCollectionDefinition(); Modified: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties 2013-01-23 14:11:03 UTC (rev 2456) @@ -58,10 +58,11 @@ # CORE UI configuration parameters # ############################################################################## -core.ui.pagemap.root_page_url=portal/ -core.ui.pagemap.workspace_url=portal/ -core.ui.pagemap.user_redirect_url=content-center/redirect.jsp -# With versin 2 moved from kernel/security to ui rsp ui.permissions and +core.ui.pagemap.root_page_url=/portal/ +#core.ui.pagemap.user_redirect_url=content-center/redirect.jsp +core.ui.pagemap.user_redirect_url=/content-center/ +core.ui.pagemap.workspace_url=/portal/ +# With version 2 moved from kernel/security to ui rsp ui.permissions and # no longer intended to be user configurable. # TODO CHECK what these URLS (esp. ../one) is used for. # waf.pagemap.permission=permissions/ ; DEFAULT @@ -99,7 +100,8 @@ # list the desired content section names #com.arsdigita.cms.loader.section_names=generic,openccm,homepages -com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker +# Replace CMS category form with a terms specific widget +com.arsdigita.cms.category_authoring_add_form=com.arsdigita.london.terms.ui.ItemCategoryPicker # Check parameter, not part of CMSConfig com.arsdigita.cms.check_bcc=ess...@ca... @@ -214,10 +216,6 @@ ; Comment this out or increase the num_of_threads if you really use remote search com.arsdigita.london.search.num_threads=10 -# # ccm-auth-http application -# auth.http.admin_email=web...@ap... -# auth.http.admin_identifier=webmaster - # LDN Dublin Core configuration parameters # ############################################################################## com.arsdigita.london.cms.dublin.audience_domain=LGAL Modified: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml 2013-01-23 14:11:03 UTC (rev 2456) @@ -142,7 +142,7 @@ <servlet> <servlet-name>content-center</servlet-name> - <servlet-class>com.arsdigita.cms.WorkspaceServlet</servlet-class> + <servlet-class>com.arsdigita.cms.ContentCenterServlet</servlet-class> </servlet> <servlet> Modified: contrib/camden/ccm-lbc-aplaws/bundles/intranet/templates/ERROR/404.jsp =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/templates/ERROR/404.jsp 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/templates/ERROR/404.jsp 2013-01-23 14:11:03 UTC (rev 2456) @@ -1,7 +1,8 @@ <%@ page isErrorPage="true" import="com.arsdigita.dispatcher.DispatcherHelper, - com.arsdigita.sitenode.ServletErrorReport, - com.arsdigita.web.Web, com.arsdigita.web.URL" %> + com.arsdigita.web.ServletErrorReport, + com.arsdigita.web.Web, + com.arsdigita.web.URL" %> <%DispatcherHelper.forceCacheDisable(response);%> <%-- NB. The above cacheDisable command must be on the first line of the jsp Modified: contrib/camden/ccm-lbc-aplaws/bundles/intranet/templates/ERROR/500.jsp =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/templates/ERROR/500.jsp 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/templates/ERROR/500.jsp 2013-01-23 14:11:03 UTC (rev 2456) @@ -1,7 +1,8 @@ <%@ page isErrorPage="true" import="com.arsdigita.dispatcher.DispatcherHelper, - com.arsdigita.sitenode.ServletErrorReport, - com.arsdigita.web.Web, com.arsdigita.web.URL" %> + com.arsdigita.web.ServletErrorReport, + com.arsdigita.web.Web, + com.arsdigita.web.URL" %> <%DispatcherHelper.forceCacheDisable(response);%> <%-- NB. The above cacheDisable command must be on the first line of the jsp Modified: contrib/camden/ccm-lbc-aplaws/bundles/public/cfg/integration.properties =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/public/cfg/integration.properties 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/public/cfg/integration.properties 2013-01-23 14:11:03 UTC (rev 2456) @@ -58,10 +58,11 @@ # CORE UI configuration parameters # ############################################################################## -core.ui.pagemap.root_page_url=portal/ -core.ui.pagemap.workspace_url=portal/ -core.ui.pagemap.user_redirect_url=content-center/redirect.jsp -# With versin 2 moved from kernel/security to ui rsp ui.permissions and +core.ui.pagemap.root_page_url=/portal/ +#core.ui.pagemap.user_redirect_url=content-center/redirect.jsp +core.ui.pagemap.user_redirect_url=/content-center/ +core.ui.pagemap.workspace_url=/portal/ +# With version 2 moved from kernel/security to ui rsp ui.permissions and # no longer intended to be user configurable. # TODO CHECK what these URLS (esp. ../one) is used for. # waf.pagemap.permission=permissions/ ; DEFAULT @@ -99,7 +100,8 @@ # list the desired content section names #com.arsdigita.cms.loader.section_names=generic,openccm,homepages -com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker +# Replace CMS category form with a terms specific widget +com.arsdigita.cms.category_authoring_add_form=com.arsdigita.london.terms.ui.ItemCategoryPicker # Check parameter, not part of CMSConfig com.arsdigita.cms.check_bcc=ess...@ca... @@ -225,9 +227,6 @@ ; Comment this out or increase the num_of_threads if you really use remote search com.arsdigita.london.search.num_threads=10 -# # ccm-auth-http application -# auth.http.admin_email=web...@ap... -# auth.http.admin_identifier=webmaster # LDN Dublin Core configuration parameters # ############################################################################## Modified: contrib/camden/ccm-lbc-aplaws/bundles/public/cfg/web.xml =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/public/cfg/web.xml 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/public/cfg/web.xml 2013-01-23 14:11:03 UTC (rev 2456) @@ -142,7 +142,7 @@ <servlet> <servlet-name>content-center</servlet-name> - <servlet-class>com.arsdigita.cms.WorkspaceServlet</servlet-class> + <servlet-class>com.arsdigita.cms.ContentCenterServlet</servlet-class> </servlet> <servlet> @@ -194,52 +194,7 @@ </init-param> </servlet> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Camden viewing options - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <servlet> - <servlet-name>LargeTextServlet</servlet-name> - <display-name>Large Text Output Servlet</display-name> - <servlet-class> - com.arsdigita.web.InternalPrefixerServlet - </servlet-class> - <init-param> - <param-name>prefix</param-name> - <param-value>/large</param-value> - </init-param> - </servlet> - - <servlet> - <servlet-name>LargeLinearTextServlet</servlet-name> - <display-name>Large Linear Text Output Servlet</display-name> - <servlet-class> - com.arsdigita.web.InternalPrefixerServlet - </servlet-class> - <init-param> - <param-name>prefix</param-name> - <param-value>/linear</param-value> - </init-param> - </servlet> - - <servlet> - <servlet-name>HighContrastLinearTextServlet</servlet-name> - <display-name>High Contrast Linear Text Output Servlet</display-name> - <servlet-class> - com.arsdigita.web.InternalPrefixerServlet - </servlet-class> - <init-param> - <param-name>prefix</param-name> - <param-value>/zoom</param-value> - </init-param> - </servlet> -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Camden viewing options END - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - - - -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MODULES SERVLET DECLARATIONS SECTION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> @@ -579,25 +534,6 @@ <url-pattern>/print/*</url-pattern> </servlet-mapping> - - <!-- viewing option servlet mapping --> - <servlet-mapping> - <servlet-name>LargeTextServlet</servlet-name> - <url-pattern>/large/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>LargeLinearTextServlet</servlet-name> - <url-pattern>/linear/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>HighContrastLinearTextServlet</servlet-name> - <url-pattern>/zoom/*</url-pattern> - </servlet-mapping> - <!--// end viewing option servlet mapping // --> - - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ERROR PAGES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> Modified: contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden400.jsp =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden400.jsp 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden400.jsp 2013-01-23 14:11:03 UTC (rev 2456) @@ -1,7 +1,8 @@ <%@ page isErrorPage="true" import="com.arsdigita.dispatcher.DispatcherHelper, - com.arsdigita.sitenode.ServletErrorReport, - com.arsdigita.web.Web, com.arsdigita.web.URL" %> + com.arsdigita.web.ServletErrorReport, + com.arsdigita.web.Web, + com.arsdigita.web.URL" %> <%DispatcherHelper.forceCacheDisable(response);%> <%-- NB. The above cacheDisable command must be on the first line of the jsp Modified: contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden404.jsp =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden404.jsp 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden404.jsp 2013-01-23 14:11:03 UTC (rev 2456) @@ -1,7 +1,8 @@ <%@ page isErrorPage="true" import="com.arsdigita.dispatcher.DispatcherHelper, -com.arsdigita.sitenode.ServletErrorReport, -com.arsdigita.web.Web, com.arsdigita.web.URL" %> + com.arsdigita.web.ServletErrorReport, + com.arsdigita.web.Web, + com.arsdigita.web.URL" %> <%DispatcherHelper.forceCacheDisable(response);%> <%-- NB. The above cacheDisable command must be on the first line of the jsp Modified: contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden500.jsp =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden500.jsp 2013-01-10 02:36:00 UTC (rev 2455) +++ contrib/camden/ccm-lbc-aplaws/bundles/public/templates/ERROR/camden500.jsp 2013-01-23 14:11:03 UTC (rev 2456) @@ -1,7 +1,8 @@ <%@ page isErrorPage="true" import="com.arsdigita.dispatcher.DispatcherHelper, - com.arsdigita.sitenode.ServletErrorReport, - com.arsdigita.web.Web, com.arsdigita.web.URL" %> + com.arsdigita.web.ServletErrorReport, + com.arsdigita.web.Web, + com.arsdigita.web.URL" %> <%DispatcherHelper.forceCacheDisable(response);%> <%-- NB. The above cacheDisable command must be on the first line of the jsp |
From: <pb...@fe...> - 2013-01-10 02:36:10
|
Author: pboy Date: 2013-01-10 02:36:00 +0000 (Thu, 10 Jan 2013) New Revision: 2455 Modified: contrib/camden/ccm-lbc-decisiontree/src/ccm-lbc-decisiontree.load Log: Typo fixed. Package basically works (compiles, loads, executes). Modified: contrib/camden/ccm-lbc-decisiontree/src/ccm-lbc-decisiontree.load =================================================================== --- contrib/camden/ccm-lbc-decisiontree/src/ccm-lbc-decisiontree.load 2013-01-10 02:00:06 UTC (rev 2454) +++ contrib/camden/ccm-lbc-decisiontree/src/ccm-lbc-decisiontree.load 2013-01-10 02:36:00 UTC (rev 2455) @@ -10,7 +10,7 @@ <initializer class="com.arsdigita.camden.cms.contenttypes.DecisionTreeInitializer"/> </provides> <scripts> - <schema directory="ccm-lbs-decisiontree"/> + <schema directory="ccm-lbc-decisiontree"/> <data class="com.arsdigita.camden.cms.contenttypes.DecisionTreeLoader"/> </scripts> </load> |
Author: pboy Date: 2013-01-10 02:00:06 +0000 (Thu, 10 Jan 2013) New Revision: 2454 Added: contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/consultation/ contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/consultation/ConsultationAlert.pdl contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/consultation/ConsultationApp.pdl contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/1.1.0-6.6.0/ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/1.1.0-6.6.0/doAnotherThing.sql contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/1.1.0-6.6.0/doSomething.sql contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.1.0-6.6.0.sql contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.0-1.0.1/ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.1-1.0.2/ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/postgres-1.1.0-6.6.0.sql contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ConsultationAlert.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ConsultationApp.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ConsultationConfig.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ConsultationConfig_parameter.properties contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/Initializer.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/Loader.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/ contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/AlertRemoveForm.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/ConsultationAlertConfirm.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/ConsultationAlertForm.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/ConsultationsFilter.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/ConsultationsList.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/ConsultationsNavigationModel.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/ConsultationsTable.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/admin/ contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/admin/BulkDeletionConfirm.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/admin/BulkDeletionForm.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ui/admin/BulkMobileDeletionForm.java contrib/camden/ccm-lbc-consultation/web/templates/ contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/ contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/admin/ contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/admin/deleted.jsp contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/admin/index.jsp contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/alert-new.jsp contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/alert-remove.jsp contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/alert-sms-trigger.jsp contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/alert-trigger.jsp contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/alert.jsp contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/index.jsp contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/navigation/ contrib/camden/ccm-lbc-consultation/web/themes/ contrib/camden/ccm-lbc-consultation/web/themes/heirloom/ contrib/camden/ccm-lbc-consultation/web/themes/heirloom/contenttypes/ contrib/camden/ccm-lbc-consultation/web/themes/heirloom/contenttypes/Consultation.xsl Removed: contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.pdl contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationApp.pdl contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/oracle-se/ contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationApp.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationConfig.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationConfig_parameter.properties contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/AlertRemoveForm.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAlertConfirm.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAlertForm.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsFilter.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsList.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsNavigationModel.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsTable.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/admin/ contrib/camden/ccm-lbc-consultation/web/packages/ contrib/camden/ccm-lbc-consultation/web/static/ contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/templates/ contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/www/ contrib/camden/ccm-lbc-consultation/web/templates/consultations/ Modified: contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/Consultation.pdl contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.0.0-1.0.1.sql contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.0.1-1.0.2.sql contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.config contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.load contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/Consultation.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationInitializer.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationLoader.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationUtil.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutStep.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationCreate.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationHowStep.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationPropertiesStep.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationResultsStep.java contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoStep.java contrib/camden/ccm-lbc-consultation/web/templates/ccm-lbc-consultation/navigation/consultations-index.jsp Log: Update basically completed, package compiles, loads, system starts. Known problems: * ConsultationConfig,reference to KernelHelper.getSystemAdministratorEmailAddress() crashes the Loader, uncommented for now. * The consultation application does not show up but delivers an empty page. Copied: contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/consultation/ConsultationAlert.pdl (from rev 2439, contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.pdl) =================================================================== --- contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/consultation/ConsultationAlert.pdl (rev 0) +++ contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/consultation/ConsultationAlert.pdl 2013-01-10 02:00:06 UTC (rev 2454) @@ -0,0 +1,118 @@ +// +// Copyright (C) 2005 Red Hat Inc. All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation; either version 2.1 of +// the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// $Id: ConsultationAlert.pdl 23 2005-08-02 14:11:47Z clasohm $ + +model com.arsdigita.camden.cms.consultation; + +import com.arsdigita.kernel.*; + +object type ConsultationAlert extends ACSObject { + String[0..1] firstNames = cam_consultation_alerts.first_names VARCHAR(100); + String[0..1] lastName = cam_consultation_alerts.last_name VARCHAR(100); + String[1..1] email = cam_consultation_alerts.email VARCHAR(100); + Date[1..1] creationDate = cam_consultation_alerts.creation_date; + String[1..1] confirmationToken = cam_consultation_alerts.confirmation_token VARCHAR(100); + String[1..1] cancellationToken = cam_consultation_alerts.cancellation_token VARCHAR(100); + Boolean[1..1] emailConfirmed = cam_consultation_alerts.email_confirmed; + String[0..1] mobileNumber = cam_consultation_alerts.mobile_number VARCHAR(100); + String[0..1] mobilePin = cam_consultation_alerts.mobile_pin VARCHAR(10); + Boolean[0..1] mobileConfirmed = cam_consultation_alerts.mobile_confirmed; + + reference key (cam_consultation_alerts.alert_id); +} + +query newSMSConsultations { + BigDecimal id; + + do { + select + draft.consultation_id + from + cms_items ci, + cam_consultations draft, + cam_consultations live + where + ci.item_id = live.consultation_id + and ci.master_id = draft.consultation_id + and draft.sms_alert_sent = '0' + } map { + id = draft.consultation_id; + } +} + +data operation setSMSAlertSent { + do { + update cam_consultations + set sms_alert_sent = '1' + where consultation_id in :consultationIDs + } +} + + +query newConsultations { + BigDecimal id; + BigDecimal masterId; + String purpose; + String contact; + String topic; + String consultationType; + Date startDate; + Date completionDate; + Date resultsDate; + Boolean statutory; + String targetAudience; + String geoArea; + String methodology; + String feedback; + String title; + + do { + select live.*, pa.*, i.master_id + from cam_consultations live, cam_consultations draft, + cms_pages pa, cms_items i + where pa.item_id = live.consultation_id + and i.item_id = pa.item_id + and i.version = 'live' + and draft.consultation_id = i.master_id + and draft.alert_sent = '0' + } map { + id = consultation_id; + masterId = master_id; + purpose = purpose; + contact = contact; + topic = topic; + consultationType = consultation_type; + startDate = start_date; + completionDate = completion_date; + resultsDate = results_date; + statutory = statutory; + targetAudience = target_audience; + geoArea = geo_area; + methodology = methodology; + feedback = feedback; + title = title; + } +} + +data operation setAlertSent { + do { + update cam_consultations + set alert_sent = '1' + where consultation_id in :consultationIDs + } +} Copied: contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/consultation/ConsultationApp.pdl (from rev 2439, contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationApp.pdl) =================================================================== --- contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/consultation/ConsultationApp.pdl (rev 0) +++ contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/consultation/ConsultationApp.pdl 2013-01-10 02:00:06 UTC (rev 2454) @@ -0,0 +1,26 @@ +// +// Copyright (C) 2005 Red Hat Inc. All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation; either version 2.1 of +// the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// $Id: ConsultationAlert.pdl 23 2005-08-02 14:11:47Z clasohm $ + +model com.arsdigita.camden.cms.consultation; + +import com.arsdigita.web.Application; + +object type ConsultationApp extends Application { + reference key (cam_consultation_app.application_id); +} Modified: contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/Consultation.pdl =================================================================== --- contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/Consultation.pdl 2013-01-08 01:05:44 UTC (rev 2453) +++ contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/Consultation.pdl 2013-01-10 02:00:06 UTC (rev 2454) @@ -23,20 +23,20 @@ object type Consultation extends ContentPage { - String[0..1] purpose = cam_consultations.purpose CLOB; - String[0..1] contact = cam_consultations.contact CLOB; - String[0..1] topic = cam_consultations.topic; + String[0..1] purpose = cam_consultations.purpose CLOB; + String[0..1] contact = cam_consultations.contact CLOB; + String[0..1] topic = cam_consultations.topic; String[0..1] consultationType = cam_consultations.consultation_type; - Date[0..1] startDate = cam_consultations.start_date; - Date[0..1] completionDate = cam_consultations.completion_date; - Date[0..1] resultsDate = cam_consultations.results_date; - Boolean[0..1] statutory = cam_consultations.statutory; - String[0..1] targetAudience = cam_consultations.target_audience; - String[0..1] geoArea = cam_consultations.geo_area; - String[0..1] methodology = cam_consultations.methodology CLOB; - String[0..1] feedback = cam_consultations.feedback CLOB; - Boolean[1..1] alertSent = cam_consultations.alert_sent; - Boolean[1..1] smsAlertSent = cam_consultations.sms_alert_sent; + Date[0..1] startDate = cam_consultations.start_date; + Date[0..1] completionDate = cam_consultations.completion_date; + Date[0..1] resultsDate = cam_consultations.results_date; + Boolean[0..1] statutory = cam_consultations.statutory; + String[0..1] targetAudience = cam_consultations.target_audience; + String[0..1] geoArea = cam_consultations.geo_area; + String[0..1] methodology = cam_consultations.methodology CLOB; + String[0..1] feedback = cam_consultations.feedback CLOB; + Boolean[1..1] alertSent = cam_consultations.alert_sent; + Boolean[1..1] smsAlertSent = cam_consultations.sms_alert_sent; reference key (cam_consultations.consultation_id); } Deleted: contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.pdl =================================================================== --- contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.pdl 2013-01-08 01:05:44 UTC (rev 2453) +++ contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.pdl 2013-01-10 02:00:06 UTC (rev 2454) @@ -1,118 +0,0 @@ -// -// Copyright (C) 2005 Red Hat Inc. All Rights Reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation; either version 2.1 of -// the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// $Id: ConsultationAlert.pdl 23 2005-08-02 14:11:47Z clasohm $ - -model com.arsdigita.camden.cms.contenttypes; - -import com.arsdigita.kernel.*; - -object type ConsultationAlert extends ACSObject { - String[0..1] firstNames = cam_consultation_alerts.first_names VARCHAR(100); - String[0..1] lastName = cam_consultation_alerts.last_name VARCHAR(100); - String[1..1] email = cam_consultation_alerts.email VARCHAR(100); - Date[1..1] creationDate = cam_consultation_alerts.creation_date; - String[1..1] confirmationToken = cam_consultation_alerts.confirmation_token VARCHAR(100); - String[1..1] cancellationToken = cam_consultation_alerts.cancellation_token VARCHAR(100); - Boolean[1..1] emailConfirmed = cam_consultation_alerts.email_confirmed; - String[0..1] mobileNumber = cam_consultation_alerts.mobile_number VARCHAR(100); - String[0..1] mobilePin = cam_consultation_alerts.mobile_pin VARCHAR(10); - Boolean[0..1] mobileConfirmed = cam_consultation_alerts.mobile_confirmed; - - reference key (cam_consultation_alerts.alert_id); -} - -query newSMSConsultations { - BigDecimal id; - - do { - select - draft.consultation_id - from - cms_items ci, - cam_consultations draft, - cam_consultations live - where - ci.item_id = live.consultation_id - and ci.master_id = draft.consultation_id - and draft.sms_alert_sent = '0' - } map { - id = draft.consultation_id; - } -} - -data operation setSMSAlertSent { - do { - update cam_consultations - set sms_alert_sent = '1' - where consultation_id in :consultationIDs - } -} - - -query newConsultations { - BigDecimal id; - BigDecimal masterId; - String purpose; - String contact; - String topic; - String consultationType; - Date startDate; - Date completionDate; - Date resultsDate; - Boolean statutory; - String targetAudience; - String geoArea; - String methodology; - String feedback; - String title; - - do { - select live.*, pa.*, i.master_id - from cam_consultations live, cam_consultations draft, - cms_pages pa, cms_items i - where pa.item_id = live.consultation_id - and i.item_id = pa.item_id - and i.version = 'live' - and draft.consultation_id = i.master_id - and draft.alert_sent = '0' - } map { - id = consultation_id; - masterId = master_id; - purpose = purpose; - contact = contact; - topic = topic; - consultationType = consultation_type; - startDate = start_date; - completionDate = completion_date; - resultsDate = results_date; - statutory = statutory; - targetAudience = target_audience; - geoArea = geo_area; - methodology = methodology; - feedback = feedback; - title = title; - } -} - -data operation setAlertSent { - do { - update cam_consultations - set alert_sent = '1' - where consultation_id in :consultationIDs - } -} Deleted: contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationApp.pdl =================================================================== --- contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationApp.pdl 2013-01-08 01:05:44 UTC (rev 2453) +++ contrib/camden/ccm-lbc-consultation/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationApp.pdl 2013-01-10 02:00:06 UTC (rev 2454) @@ -1,7 +0,0 @@ -model com.arsdigita.camden.cms.contenttypes; - -import com.arsdigita.web.Application; - -object type ConsultationApp extends Application { - reference key (cam_consultation_app.application_id); -} Added: contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/1.1.0-6.6.0/doAnotherThing.sql =================================================================== --- contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/1.1.0-6.6.0/doAnotherThing.sql (rev 0) +++ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/1.1.0-6.6.0/doAnotherThing.sql 2013-01-10 02:00:06 UTC (rev 2454) @@ -0,0 +1,94 @@ +-- +-- Copyright (C) 2012 Peter Boy All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: upd_system_tables.sql pboy $ + +-- rename ccm-cms-types-contact to ccm-ldn-types-contact +-- adjust various system tables to the new name of content type + +-- -------------------------------------------- +-- !!! REPLACE BY REQUIRED SQL COMMANDS !!! +-- -------------------------------------------- + +alter table init_requirements drop constraint init_requirements_init_f_cmmdn ; +alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ; + +update inits + set class_name='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where class_name='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +update init_requirements + set init='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where init='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +ALTER TABLE init_requirements + ADD CONSTRAINT init_requirements_init_f_cmmdn FOREIGN KEY (init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; +ALTER TABLE init_requirements + ADD CONSTRAINT init_require_requ_init_f_i6rgg FOREIGN KEY (required_init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + + +update content_types + set object_type='com.arsdigita.london.contenttypes.ESDService', + label='ESD Service', + description='An ESDService', + classname='com.arsdigita.london.contenttypes.ESDService' + where classname='com.arsdigita.cms.contenttypes.ESDService' ; + +update authoring_steps + set label_key='ESD Service Properties', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit the basic ESDService properties', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServicePropertiesStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServicePropertiesStep' ; + +update authoring_steps + set label_key='ESD Service Contact', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit/Choose the associated Contact object', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServiceChooseContactStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServiceChooseContactStep' ; + + + +update acs_objects + set (object_type,default_domain_class) = + ('com.arsdigita.london.contenttypes.ESDService' , + 'com.arsdigita.london.contenttypes.ESDService' ) + where default_domain_class like 'com.arsdigita.cms.contenttypes.ESDService' ; + +update lucene_docs + set type='com.arsdigita.london.contenttypes.ESDService' + where type='com.arsdigita.cms.contenttypes.ESDService' ; + +update vcx_generic_operations + set value=replace(value,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where value like '%cms.contenttypes.ESDService%'; + +update vcx_obj_changes + set obj_id=replace(obj_id,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where obj_id like '%cms.contenttypes.ESDService%'; + +update vcx_tags + set tagged_oid=replace(tagged_oid,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where tagged_oid like '%cms.contenttypes.ESDService%'; + Added: contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/1.1.0-6.6.0/doSomething.sql =================================================================== --- contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/1.1.0-6.6.0/doSomething.sql (rev 0) +++ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/default/1.1.0-6.6.0/doSomething.sql 2013-01-10 02:00:06 UTC (rev 2454) @@ -0,0 +1,47 @@ +-- +-- Copyright (C) 2012 Peter Boy All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: ren_esdservice_table.sql pboy $ + +-- rename ct_esdservice table to ct_ldn_esdservice table following +-- ccm naming conventions to make maintenance tasks easier + + +-- -------------------------------------------- +-- !!! REPLACE BY REQUIRED SQL COMMANDS !!! +-- -------------------------------------------- + + + +-- if we could figure out the old names we could rename constraints too +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; + +alter table ct_esdservice RENAME TO ct_ldn_esdservice ; + +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_p_5dac0 PRIMARY KEY(service_id); +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_cont_id_f_r4d1z FOREIGN KEY (contact_id) +-- references ct_ldn_contacts (contact_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_f_tfkqn FOREIGN KEY (service_id) +-- references cms_articles (article_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + Copied: contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql (from rev 2441, contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/oracle-se/upgrade/1.0.0-1.0.1/cam_consultations.sql) =================================================================== --- contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql (rev 0) +++ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql 2013-01-10 02:00:06 UTC (rev 2454) @@ -0,0 +1,13 @@ +alter table cam_consultations +add (alert_sent char(1)); + +alter table cam_consultations +add constraint cam_consultat_ale_sent_c_eri9a +check (alert_sent in ('0', '1')); + +update cam_consultations +set alert_sent = '0'; + +alter table cam_consultations +add constraint cam_consultat_ale_sent_c_nn +check (alert_sent is not null); Copied: contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql (from rev 2441, contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/oracle-se/upgrade/1.0.1-1.0.2/authoring_kits.sql) =================================================================== --- contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql (rev 0) +++ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql 2013-01-10 02:00:06 UTC (rev 2454) @@ -0,0 +1,6 @@ +update authoring_kits +set create_component = 'com.arsdigita.camden.cms.contenttypes.ui.ConsultationCreate' +where type_id = + (select type_id + from content_types + where object_type = 'com.arsdigita.camden.cms.contenttypes.Consultation'); Modified: contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.0.0-1.0.1.sql =================================================================== --- contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.0.0-1.0.1.sql 2013-01-08 01:05:44 UTC (rev 2453) +++ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.0.0-1.0.1.sql 2013-01-10 02:00:06 UTC (rev 2454) @@ -1 +1 @@ -@ ../oracle-se/upgrade/1.0.0-1.0.1/cam_consultations.sql +@ oracle-se/1.0.0-1.0.1/cam_consultations.sql Modified: contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.0.1-1.0.2.sql =================================================================== --- contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.0.1-1.0.2.sql 2013-01-08 01:05:44 UTC (rev 2453) +++ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.0.1-1.0.2.sql 2013-01-10 02:00:06 UTC (rev 2454) @@ -1 +1 @@ -@ ../oracle-se/upgrade/1.0.1-1.0.2/authoring_kits.sql +@ oracle-se/1.0.1-1.0.2/authoring_kits.sql Copied: contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.1.0-6.6.0.sql (from rev 2453, contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.4-6.6.0.sql) =================================================================== --- contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.1.0-6.6.0.sql (rev 0) +++ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/oracle-se-1.1.0-6.6.0.sql 2013-01-10 02:00:06 UTC (rev 2454) @@ -0,0 +1,21 @@ +-- +-- Copyright (C) 2012 Peter Boy All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: oracle-se-1.1.0-6.6.0.sql pboy $ + +@@ default/1.1.0-6.6.0/doSomething.sql +@@ default/1.1.0-6.6.0/doAnotherThing.sql Copied: contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/postgres-1.1.0-6.6.0.sql (from rev 2453, contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/postgres-1.0.4-6.6.0.sql) =================================================================== --- contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/postgres-1.1.0-6.6.0.sql (rev 0) +++ contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/upgrade/postgres-1.1.0-6.6.0.sql 2013-01-10 02:00:06 UTC (rev 2454) @@ -0,0 +1,27 @@ +-- +-- Copyright (C) 2012 Peter Boy All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: postgres-1.1.0-6.6.0.sql pboy $ + +\echo APLAWS lbc conslultation 1.1.0 -> 6.6.0 Upgrade Script (PostgreSQL) + +begin; + +\i default/1.1.0-6.6.0/doSomething.sql +\i default/1.1.0-6.6.0/doAnotherThing.sql + +commit; Modified: contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.config =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.config 2013-01-08 01:05:44 UTC (rev 2453) +++ contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.config 2013-01-10 02:00:06 UTC (rev 2454) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <registry> - <config class="com.arsdigita.camden.cms.contenttypes.ConsultationConfig" - storage="ccm-lbs-consultation/consultations.properties"/> + <config class="com.arsdigita.camden.cms.consultation.ConsultationConfig" + storage="ccm-lbs-consultation/consultation.properties"/> </registry> Modified: contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.load =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.load 2013-01-08 01:05:44 UTC (rev 2453) +++ contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.load 2013-01-10 02:00:06 UTC (rev 2454) @@ -8,10 +8,12 @@ </requires> <provides> <table name="cam_consultations"/> + <initializer class="com.arsdigita.camden.cms.consultation.Initializer"/> <initializer class="com.arsdigita.camden.cms.contenttypes.ConsultationInitializer"/> </provides> <scripts> <schema directory="ccm-lbc-consultation"/> <data class="com.arsdigita.camden.cms.contenttypes.ConsultationLoader"/> + <data class="com.arsdigita.camden.cms.consultation.Loader"/> </scripts> </load> Modified: contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade 2013-01-08 01:05:44 UTC (rev 2453) +++ contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade 2013-01-10 02:00:06 UTC (rev 2454) @@ -11,4 +11,7 @@ <version from="1.0.3" to="1.1.0"> <script sql="ccm-lbc-consultation/upgrade/::database::-1.0.3-1.1.0.sql"/> </version> + <version from="1.1.0" to="6.6.0"> + <script sql="ccm-lbc-consultation/upgrade/::database::-1.1.0-6.6.0.sql"/> + </version> </upgrade> Copied: contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ConsultationAlert.java (from rev 2439, contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java) =================================================================== --- contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ConsultationAlert.java (rev 0) +++ contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ConsultationAlert.java 2013-01-10 02:00:06 UTC (rev 2454) @@ -0,0 +1,598 @@ +/* + * Copyright (C) 2005 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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.camden.cms.consultation; + +import com.arsdigita.camden.cms.contenttypes.Consultation; +import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; +import com.arsdigita.cms.util.GlobalizationUtil; +import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.globalization.GlobalizedMessage; +import com.arsdigita.kernel.ACSObject; +import com.arsdigita.kernel.security.Crypto; +import com.arsdigita.mail.Mail; +import com.arsdigita.persistence.DataCollection; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.DataOperation; +import com.arsdigita.persistence.DataQuery; +import com.arsdigita.persistence.OID; +import com.arsdigita.persistence.Session; +import com.arsdigita.persistence.SessionManager; +import com.arsdigita.util.StringUtils; +import com.arsdigita.web.ParameterMap; +import com.arsdigita.web.URL; +import com.arsdigita.web.Web; +import com.arsdigita.xml.Formatter; +import com.arsdigita.xml.formatters.DateFormatter; +import java.math.BigDecimal; +import java.security.GeneralSecurityException; +import java.util.Collection; +import java.util.Date; +import java.util.LinkedList; +import java.util.Locale; +import java.util.Random; +import javax.mail.MessagingException; +import org.apache.commons.codec.binary.Base64; +import org.apache.log4j.Logger; + +/** + * Alert requests for the Camden Consultation content type. + * Requests must be confirmed via email before they become + * active. Old pending requests are deleted periodically. + * + * @author Carsten Clasohm + * @version $Id: ConsultationAlert.java 25 2005-08-03 16:01:08Z clasohm $ + */ +public class ConsultationAlert extends ACSObject { + + private static final Logger s_log = + Logger.getLogger(ConsultationAlert.class.getName()); + + public static final String BASE_DATA_OBJECT_TYPE = + "com.arsdigita.camden.cms.contenttypes.ConsultationAlert"; + + public static final String FIRST_NAMES = "firstNames"; + public static final String LAST_NAME = "lastName"; + public static final String EMAIL = "email"; + public static final String CREATION_DATE = "creationDate"; + public static final String CONFIRMATION_TOKEN = "confirmationToken"; + public static final String CANCELLATION_TOKEN = "cancellationToken"; + public static final String EMAIL_CONFIRMED = "emailConfirmed"; + public static final String MOBILE_NUMBER = "mobileNumber"; + public static final String MOBILE_PIN = "mobilePin"; + public static final String MOBILE_CONFIRMED = "mobileConfirmed"; + public final static String CONFIRM_PATH = "/alert.jsp"; + public final static String CONFIRM_PARAMETER = "co"; + public final static String CANCEL_PARAMETER = "ca"; + public final static String CANCEL_SMS_PARAMETER = "cs"; + public final static String REMOVAL_REQUEST_PARAMETER = "rr"; + + public ConsultationAlert() { + this(BASE_DATA_OBJECT_TYPE); + } + + public ConsultationAlert(OID oid) throws DataObjectNotFoundException { + super(oid); + } + + public ConsultationAlert(BigDecimal id) throws DataObjectNotFoundException { + this(new OID(BASE_DATA_OBJECT_TYPE, id)); + } + + public ConsultationAlert(DataObject obj) { + super(obj); + } + + public ConsultationAlert(String type) { + super(type); + + setConfirmationToken(getRandomString()); + setCancellationToken(getRandomString()); + setEmailConfirmed(Boolean.FALSE); + setMobileConfirmed(Boolean.FALSE); + setCreationDate(new Date()); + } + + /** + * @return the base PDL object type for this item. Child classes + * should override this method to return the correct value. + */ + @Override + public String getBaseDataObjectType() { + return BASE_DATA_OBJECT_TYPE; + } + + public String getFirstNames() { + return (String) get(FIRST_NAMES); + } + + public void setFirstNames(String value) { + set(FIRST_NAMES, value); + } + + public String getLastName() { + return (String) get(LAST_NAME); + } + + public void setLastName(String value) { + set(LAST_NAME, value); + } + + public String getEmail() { + return (String) get(EMAIL); + } + + public void setEmail(String value) { + set(EMAIL, value); + } + + public Date getCreationDate() { + return (Date) get(CREATION_DATE); + } + + public void setCreationDate(Date value) { + set(CREATION_DATE, value); + } + + public String getConfirmationToken() { + return (String) get(CONFIRMATION_TOKEN); + } + + public void setConfirmationToken(String value) { + set(CONFIRMATION_TOKEN, value); + } + + public String getCancellationToken() { + return (String) get(CANCELLATION_TOKEN); + } + + public void setCancellationToken(String value) { + set(CANCELLATION_TOKEN, value); + } + + public Boolean getEmailConfirmed() { + return (Boolean) get(EMAIL_CONFIRMED); + } + + public void setEmailConfirmed(Boolean value) { + set(EMAIL_CONFIRMED, value); + } + + public String getMobileNumber() { + return (String) get(MOBILE_NUMBER); + } + + public void setMobileNumber(String value) { + set(MOBILE_NUMBER, value); + } + + public String getMobilePin() { + return (String) get(MOBILE_PIN); + } + + public void randomizePin(int length) { + set(MOBILE_PIN, getRandomPin(length)); + } + + public void clearMobilePin() { + set(MOBILE_PIN, null); + } + + public Boolean getMobileConfirmed() { + return (Boolean) get(MOBILE_CONFIRMED); + } + + public void setMobileConfirmed(Boolean value) { + set(MOBILE_CONFIRMED, value); + } + + private String getRandomString() { + byte[] salt = new byte[8]; + try { + Crypto.getRandom().nextBytes(salt); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + + String result = new String((new Base64()).encode(salt)); + + // Convert characters which could be problematic in a URL. + result = result.replace('+', 'p'). + replace('=', 'e'). + replace('/', 's'); + + return result; + } + + private String getRandomPin(int length) { + StringBuilder pin = new StringBuilder(length); + Random random; + try { + random = Crypto.getRandom(); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + for (int i=0; i<length; i++) { + pin.append(random.nextInt(10)); + } + return pin.toString(); + } + + + public static String confirm(String token) { + DataCollection alerts = + SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE); + alerts.addEqualsFilter(CONFIRMATION_TOKEN, token); + + String result = null; + if (alerts.next()) { + ConsultationAlert alert = + new ConsultationAlert(alerts.getDataObject()); + alerts.close(); + + result = alert.getEmail(); + + alert.setEmailConfirmed(Boolean.TRUE); + alert.save(); + } + + return result; + } + + public static String cancel(String token) { + DataCollection alerts = + SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE); + alerts.addEqualsFilter(CANCELLATION_TOKEN, token); + + String result = null; + if (alerts.next()) { + ConsultationAlert alert = + new ConsultationAlert(alerts.getDataObject()); + alerts.close(); + + result = alert.getEmail(); + + alert.delete(); + } + + return result; + } + + public static String cancelSMS(String token) { + DataCollection alerts = + SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE); + alerts.addEqualsFilter(CANCELLATION_TOKEN, token); + + String result = null; + if (alerts.next()) { + ConsultationAlert alert = + new ConsultationAlert(alerts.getDataObject()); + alerts.close(); + + result = alert.getMobileNumber(); + alert.setMobileNumber(null); + alert.clearMobilePin(); + alert.setMobileConfirmed(Boolean.FALSE); + alert.save(); + } + + return result; + } + + + public static ConsultationAlert findByEmail(String email) { + DataCollection alerts = + SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE); + alerts.addEqualsFilter(EMAIL, email); + + ConsultationAlert alert = null; + if (alerts.next()) { + alert = new ConsultationAlert(alerts.getDataObject()); + alerts.close(); + } + + return alert; + } + + /** + * Deletes alert requests which have not been confirmed, and which + * are older than 24h. + */ + public static void purgeUnconfirmed() { + Session dbSession = SessionManager.getSession(); + int dbType = dbSession.getDatabase(); + + DataCollection alerts = dbSession.retrieve(BASE_DATA_OBJECT_TYPE); + + alerts.addEqualsFilter(EMAIL_CONFIRMED, Boolean.FALSE); + alerts.addFilter("creationDate < current_date - 1"); + + while (alerts.next()) { + ConsultationAlert alert = + new ConsultationAlert(alerts.getDataObject()); + alert.delete(); + } + } + + + /** + * <p>Sends alert SMS if there are newly published Consultation items + * since the last time SMS alerts have been sent. + * </p> + */ + + public static void sendSMSAlerts() { + Session dbSession = SessionManager.getSession(); + Locale locale = Locale.getDefault(); + + DataQuery items = + dbSession.retrieveQuery("com.arsdigita.camden.cms.contenttypes.newSMSConsultations"); + + Collection itemIDs = new LinkedList(); + while (items.next()) { + itemIDs.add( (BigDecimal) items.get(Consultation.ID)); + } + + int itemCount = itemIDs.size(); + if (itemCount == 0) { + return; + } + + ConsultationApp app = ConsultationApp.retrieveApplication(); + String consultationURL = URL.there(app, "", null).getURL(); + + // Compose the text of an SMS instance: + + DataCollection alerts = dbSession.retrieve(BASE_DATA_OBJECT_TYPE); + alerts.addEqualsFilter(EMAIL_CONFIRMED, Boolean.TRUE); + alerts.addEqualsFilter(MOBILE_CONFIRMED, Boolean.TRUE); + + String siteURL = URL.root().getURL(); + String from = ConsultationUtil.getConfig().getAlertsSenderEmail(); + + while (alerts.next()) { + + ConsultationAlert alert = new ConsultationAlert(alerts.getDataObject()); + + String[] args = { String.valueOf(itemCount), siteURL, consultationURL, + alert.getEmail(), alert.getFirstNames(), alert.getLastName() }; + // Not sure whether the subject gets through the gateway at all, but just in case + String smsSubject = (String) ConsultationUtil.globalize("sms.alert.subject", args).localize(locale); + String smsText = (String) ConsultationUtil.globalize("sms.alert.text", args).localize(locale); + + String mobile = alert.getMobileNumber(); + // Convert mobile number to email2sms gateway address + String smsEmail = ConsultationUtil.getConfig().getSMSProvider().getEmail(mobile); + + try { + s_log.debug("About to send SMS alert to " + mobile + " using email: " + smsEmail + ", body: " + smsText); + Mail.send(smsEmail, from, smsSubject, smsText); + } catch (MessagingException ex) { + s_log.warn("Exception while sending consultation alert to " + + smsEmail + ": " + ex.getMessage()); + } + } + + DataOperation op = + dbSession.retrieveDataOperation("com.arsdigita.camden.cms.contenttypes.setSMSAlertSent"); + op.setParameter("consultationIDs", itemIDs); + op.execute(); + } + + + /** + * <p>Sends alert emails for all published Consultation items + * for which no alerts have been sent yet. Only sends an alert + * if the item has never been published before. This should be run + * once a day.</p> + */ + public static void sendAlerts() { + Session dbSession = SessionManager.getSession(); + Locale locale = Locale.getDefault(); + + // First get the list of consultations for which we should send alerts, + // and build the text common to all alerts. + DataQuery items = + dbSession.retrieveQuery("com.arsdigita.camden.cms.contenttypes.newConsultations"); + + if (items.isEmpty()) + return; + + String titleLabel = + (String)ConsultationUtil.globalize("title").localize(locale); + String urlLabel = + (String)ConsultationUtil.globalize("url").localize(locale); + String statusLabel = + (String)ConsultationUtil.globalize("status").localize(locale); + String purposeLabel = + (String)ConsultationUtil.globalize("purpose").localize(locale); + String contactLabel = + (String)ConsultationUtil.globalize("contact").localize(locale); + String topicLabel = + (String)ConsultationUtil.globalize("topic").localize(locale); + String typeLabel = + (String)ConsultationUtil.globalize("type").localize(locale); + String startDateLabel = + (String)ConsultationUtil.globalize("start_date").localize(locale); + String completionDateLabel = + (String)ConsultationUtil.globalize("completion_date").localize(locale); + String resultsDateLabel = + (String)ConsultationUtil.globalize("results_date").localize(locale); + String statutoryLabel = + (String)ConsultationUtil.globalize("statutory").localize(locale); + String targetAudienceLabel = + (String)ConsultationUtil.globalize("target_audience").localize(locale); + String geoAreaLabel = + (String)ConsultationUtil.globalize("geo_area").localize(locale); + + String siteURL = URL.root().getURL(); + URL rootURL = URL.root(); + + // Remove the trailing slash, if there is one. + if (siteURL.endsWith("/")) + siteURL = siteURL.substring(0, siteURL.length()-1); + + Formatter dateFormatter = new DateFormatter(); + String itemList = ""; + Collection itemIDs = new LinkedList(); + + while (items.next()) { + String title = (String)items.get(Consultation.TITLE); + String purpose = StringUtils.htmlToText((String)items.get(Consultation.PURPOSE)); + String contact = StringUtils.htmlToText((String)items.get(Consultation.CONTACT)); + BigDecimal id = (BigDecimal)items.get("masterId"); + + OID oid = new OID(Consultation.BASE_DATA_OBJECT_TYPE, id); + ParameterMap map = new ParameterMap(); + map.setParameter("oid", oid.toString()); + map.setParameter("context", "live"); + String itemURL = siteURL + (new URL(rootURL.getScheme(), + rootURL.getServerName(), + rootURL.getServerPort(), + "", + "", + "/redirect/", map )).toString(); + + String topic = Consultation.internalGetPrettyTopics((String)items.get(Consultation.TOPIC)); + String consultationType = Consultation.internalGetPrettyTypes((String)items.get(Consultation.CONSULTATION_TYPE)); + String targetAudience = Consultation.internalGetPrettyTargets((String)items.get(Consultation.TARGET_AUDIENCE)); + String geoArea = Consultation.internalGetPrettyGeoAreas((String)items.get(Consultation.GEO_AREA)); + + Date startDateDate = (Date)items.get(Consultation.START_DATE); + String startDate = null; + if (startDateDate != null) + startDate = dateFormatter.format(startDateDate); + + Date completionDateDate = (Date)items.get(Consultation.COMPLETION_DATE); + String completionDate = null; + if (completionDateDate != null) + completionDate = dateFormatter.format(completionDateDate); + + Date resultsDateDate = (Date)items.get(Consultation.RESULTS_DATE); + String resultsDate = null; + if (resultsDateDate != null) + resultsDate = dateFormatter.format(resultsDateDate); + + GlobalizedMessage statusMsg = + Consultation.getStatus(startDateDate, completionDateDate); + String status = null; + if (statusMsg != null) + status = (String)statusMsg.localize(locale); + + Boolean statutoryFlag = (Boolean)items.get(Consultation.STATUTORY); + String statutory = + (String)GlobalizationUtil. + globalize(statutoryFlag != null && statutoryFlag.booleanValue() ? "yes" : "no"). + localize(locale); + + itemList += + "----------\n\n" + + urlLabel + ": " + itemURL + "\n\n" + + titleLabel + ": " + title + "\n"; + + if (status != null) + itemList += statusLabel + ": " + status + "\n"; + + if (!"".equals(purpose)) + itemList += "\n" + purposeLabel + ":\n" + purpose.trim() + "\n"; + + if (!"".equals(contact)) + itemList += "\n" + contactLabel + ":\n" + contact.trim() + "\n"; + + itemList += "\n"; + + if (topic != null) + itemList += topicLabel + ": " + topic + "\n"; + if (consultationType != null) + itemList += typeLabel + ": " + consultationType + "\n"; + if (startDate != null) + itemList += startDateLabel + ": " + startDate + "\n"; + if (completionDate != null) + itemList += completionDateLabel + ": " + completionDate + "\n"; + if (resultsDate != null) + itemList += resultsDateLabel + ": " + resultsDate + "\n"; + itemList += statutoryLabel + ": " + statutory + "\n"; + if (targetAudience != null) + itemList += targetAudienceLabel + ": " + targetAudience + "\n"; + if (geoArea != null) + itemList += geoAreaLabel + ": " + geoArea + "\n"; + + itemList += "\n"; + + itemIDs.add(id); + } + + DataCollection alerts = dbSession.retrieve(BASE_DATA_OBJECT_TYPE); + alerts.addEqualsFilter(EMAIL_CONFIRMED, Boolean.TRUE); + + String siteName = Web.getConfig().getSiteName(); + String from = ConsultationUtil.getConfig().getAlertsSenderEmail(); + + String[] args1 = { siteName }; + String subject = + (String)ConsultationUtil.globalize("alert.subject", args1).localize(locale); + + while (alerts.next()) { + String email = (String)alerts.get(EMAIL); + String firstNames = (String)alerts.get(FIRST_NAMES); + String lastName = (String)alerts.get(LAST_NAME); + String cancelToken = (String)alerts.get(CANCELLATION_TOKEN); + + String recipientName = email; + if (firstNames != null && !"".equals(firstNames)) { + recipientName = firstNames; + if (lastName == null && !"".equals(lastName)) + recipientName += " " + lastName; + } + + ConsultationApp app = ConsultationApp.retrieveApplication(); + ParameterMap parameters = new ParameterMap(); + parameters.setParameter(ConsultationAlert.CANCEL_PARAMETER, + cancelToken); + String cancelURL = + URL.there(app, ConsultationAlert.CONFIRM_PATH, parameters).getURL(); + + String[] args2 = + { recipientName, email, siteName, siteURL }; + String header = + (String)ConsultationUtil.globalize("alert.header", args2).localize(locale); + + String[] args3 = + { email, cancelURL, siteName, siteURL }; + String footer = + (String)ConsultationUtil.globalize("alert.footer", args3).localize(locale); + + String body = header + "\n\n" + itemList + "----------\n\n" + footer; + + try { + s_log.debug("About to send mail to " + email + "\nSubject: " + subject + "\nBody:\n" + body); + Mail.send(email, from, subject, body); + } catch (MessagingException ex) { + s_log.warn("Exception while sending consultation alert to " + + email + ": " + ex.getMessage()); + } + } + + DataOperation op = + dbSession.retrieveDataOperation("com.arsdigita.camden.cms.contenttypes.setAlertSent"); + op.setParameter("consultationIDs", itemIDs); + op.execute(); + } + +} Copied: contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/consultation/ConsultationApp.java (from rev 2439, contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationApp.java) =================================================================== --- contrib/camden/ccm-lbc-co... [truncated message content] |
Author: pboy Date: 2013-01-08 01:05:44 +0000 (Tue, 08 Jan 2013) New Revision: 2453 Added: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doAnotherThing.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doSomething.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.4-6.6.0.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/postgres-1.0.4-6.6.0.sql contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/FoiFilter.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/FoiList.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/FoiNavigationModel.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/FoiTable.java Removed: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/oracle-se/ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiFilter.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java Modified: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/Foi.pdl contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.0-1.0.1.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.1-1.0.2.sql contrib/camden/ccm-lbc-foi/src/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml contrib/camden/ccm-lbc-foi/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Foi.xml contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesForm.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesStep.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeForm.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeStep.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/FoiApp.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Loader.java contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/deleted.jsp contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/index.jsp contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/navigation/foi-indexpage.jsp Log: Next part of migration to version 2.0. Module compiles, system starts, content-center works. Display of published item fails. Modified: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/Foi.pdl =================================================================== --- contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/Foi.pdl 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/Foi.pdl 2013-01-08 01:05:44 UTC (rev 2453) @@ -15,7 +15,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// $Id: Consultation.pdl 21 2005-08-02 14:10:20Z clasohm $ +// $Id: Foi.pdl 21 2005-08-02 14:10:20Z clasohm $ model com.arsdigita.camden.cms.contenttypes; Modified: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl =================================================================== --- contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,5 +1,24 @@ -model com.arsdigita.camden.cms.contenttypes; +// +// Copyright (C) 2005 Red Hat Inc. All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation; either version 2.1 of +// the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// $Id: FoiApp.pdl 21 2005-08-02 14:10:20Z clasohm $ +model com.arsdigita.camden.cms.foi; + import com.arsdigita.web.Application; object type FoiApp extends Application { Added: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doAnotherThing.sql =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doAnotherThing.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doAnotherThing.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,94 @@ +-- +-- Copyright (C) 2012 Peter Boy All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: upd_system_tables.sql pboy $ + +-- rename ccm-cms-types-contact to ccm-ldn-types-contact +-- adjust various system tables to the new name of content type + +-- -------------------------------------------- +-- !!! REPLACE BY REQUIRED SQL COMMANDS !!! +-- -------------------------------------------- + +alter table init_requirements drop constraint init_requirements_init_f_cmmdn ; +alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ; + +update inits + set class_name='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where class_name='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +update init_requirements + set init='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where init='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +ALTER TABLE init_requirements + ADD CONSTRAINT init_requirements_init_f_cmmdn FOREIGN KEY (init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; +ALTER TABLE init_requirements + ADD CONSTRAINT init_require_requ_init_f_i6rgg FOREIGN KEY (required_init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + + +update content_types + set object_type='com.arsdigita.london.contenttypes.ESDService', + label='ESD Service', + description='An ESDService', + classname='com.arsdigita.london.contenttypes.ESDService' + where classname='com.arsdigita.cms.contenttypes.ESDService' ; + +update authoring_steps + set label_key='ESD Service Properties', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit the basic ESDService properties', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServicePropertiesStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServicePropertiesStep' ; + +update authoring_steps + set label_key='ESD Service Contact', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit/Choose the associated Contact object', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServiceChooseContactStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServiceChooseContactStep' ; + + + +update acs_objects + set (object_type,default_domain_class) = + ('com.arsdigita.london.contenttypes.ESDService' , + 'com.arsdigita.london.contenttypes.ESDService' ) + where default_domain_class like 'com.arsdigita.cms.contenttypes.ESDService' ; + +update lucene_docs + set type='com.arsdigita.london.contenttypes.ESDService' + where type='com.arsdigita.cms.contenttypes.ESDService' ; + +update vcx_generic_operations + set value=replace(value,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where value like '%cms.contenttypes.ESDService%'; + +update vcx_obj_changes + set obj_id=replace(obj_id,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where obj_id like '%cms.contenttypes.ESDService%'; + +update vcx_tags + set tagged_oid=replace(tagged_oid,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where tagged_oid like '%cms.contenttypes.ESDService%'; + Added: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doSomething.sql =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doSomething.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doSomething.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,47 @@ +-- +-- Copyright (C) 2012 Peter Boy All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: ren_esdservice_table.sql pboy $ + +-- rename ct_esdservice table to ct_ldn_esdservice table following +-- ccm naming conventions to make maintenance tasks easier + + +-- -------------------------------------------- +-- !!! REPLACE BY REQUIRED SQL COMMANDS !!! +-- -------------------------------------------- + + + +-- if we could figure out the old names we could rename constraints too +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; + +alter table ct_esdservice RENAME TO ct_ldn_esdservice ; + +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_p_5dac0 PRIMARY KEY(service_id); +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_cont_id_f_r4d1z FOREIGN KEY (contact_id) +-- references ct_ldn_contacts (contact_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_f_tfkqn FOREIGN KEY (service_id) +-- references cms_articles (article_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + Copied: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql (from rev 2448, contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/oracle-se/upgrade/1.0.0-1.0.1/cam_consultations.sql) =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,13 @@ +alter table cam_consultations +add (alert_sent char(1)); + +alter table cam_consultations +add constraint cam_consultat_ale_sent_c_eri9a +check (alert_sent in ('0', '1')); + +update cam_consultations +set alert_sent = '0'; + +alter table cam_consultations +add constraint cam_consultat_ale_sent_c_nn +check (alert_sent is not null); Copied: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql (from rev 2448, contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/oracle-se/upgrade/1.0.1-1.0.2/authoring_kits.sql) =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,6 @@ +update authoring_kits +set create_component = 'com.arsdigita.camden.cms.contenttypes.ui.ConsultationCreate' +where type_id = + (select type_id + from content_types + where object_type = 'com.arsdigita.camden.cms.contenttypes.Consultation'); Modified: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.0-1.0.1.sql =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.0-1.0.1.sql 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.0-1.0.1.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -1 +1 @@ -@ ../oracle-se/upgrade/1.0.0-1.0.1/cam_consultations.sql +@ oracle-se/1.0.0-1.0.1/cam_consultations.sql Modified: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.1-1.0.2.sql =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.1-1.0.2.sql 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.1-1.0.2.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -1 +1 @@ -@ ../oracle-se/upgrade/1.0.1-1.0.2/authoring_kits.sql +@ oracle-se/1.0.1-1.0.2/authoring_kits.sql Copied: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.4-6.6.0.sql (from rev 2451, contrib/camden/ccm-lbc-aplaws/sql/ccm-lbc-aplaws/upgrade/oracle-se-1.0.4-6.6.1.sql) =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.4-6.6.0.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.4-6.6.0.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,21 @@ +-- +-- Copyright (C) 2012 Peter Boy All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: oracle-se-1.0.4-6.6.1.sql pboy $ + +@@ default/1.0.4-6.6.1/doSomething.sql +@@ default/1.0.4-6.6.1/doAnotherThing.sql Copied: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/postgres-1.0.4-6.6.0.sql (from rev 2451, contrib/camden/ccm-lbc-aplaws/sql/ccm-lbc-aplaws/upgrade/postgres-1.0.4-6.6.1.sql) =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/postgres-1.0.4-6.6.0.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/postgres-1.0.4-6.6.0.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,27 @@ +-- +-- Copyright (C) 2012 Peter Boy All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- $Id: postgres-6.6.0-6.6.1.sql pboy $ + +\echo APLAWS ldn esdservice 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL) + +begin; + +\i default/1.0.4-6.6.1/doSomething.sql +\i default/1.0.4-6.6.1/doAnotherThing.sql + +commit; Modified: contrib/camden/ccm-lbc-foi/src/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml =================================================================== --- contrib/camden/ccm-lbc-foi/src/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,6 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> -<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> - <ctd:content-type label="Foi" description="Foi Content TypeType" objectType="com.arsdigita.camden.cms.contenttypes.Foi" classname="com.arsdigita.camden.cms.contenttypes.Foi"> +<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> + + <ctd:content-type label="Foi" + description="Foi Content TypeType" + objectType="com.arsdigita.camden.cms.contenttypes.Foi" + classname="com.arsdigita.camden.cms.contenttypes.Foi"> + <ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate"> <ctd:authoring-step labelKey="cms.contenttypes.shared.basic_properties.title" Modified: contrib/camden/ccm-lbc-foi/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Foi.xml =================================================================== --- contrib/camden/ccm-lbc-foi/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Foi.xml 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Foi.xml 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<xrd:adapters xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd"> +<xrd:adapters xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd"> + <!-- No need to list all the content types here. Only need to list a type if is adds associations that were not in the parent type, or to remove attributes Modified: contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> <load> <requires> <table name="inits"/> Modified: contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> <upgrade> </upgrade> Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -39,7 +39,8 @@ * Constructor, just sets the PDL manifest file and object type string. */ public FoiInitializer() { - super("ccm-lbc-foi.pdl.mf", Foi.BASE_DATA_OBJECT_TYPE); + super("empty.pdl.mf", Foi.BASE_DATA_OBJECT_TYPE); + } // REMOVED without replacement, does nothing at all Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -26,38 +26,55 @@ /** - * Loader. * + * Loader executes nonrecurring once at install time and loads the + * FOI contenttype package persistently into database. + * + * It uses the base class to create the database schema and the required + * table entries for the contenttype. + * * @author Rahul Shukla * @version $Id: FoiLoader.java 285 2006-11-05 00:29:02Z rahul shukla $ */ public class FoiLoader extends AbstractContentTypeLoader { - /** */ + /** Defines the xml file containing the EForm content types + * property definitions. */ private static final String[] TYPES = { "/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml" }; /** + * Run method performs the loading tasks. * + * Overwrites the parent class's method to add funktionality: Register + * jsp template for Navigation index page. */ public void run(ScriptContext ctx) { - // execute super script to create type + /* Execute super script to create type and do standard stuff. */ super.run(ctx); new KernelExcursion() { protected void excurse() { setEffectiveParty(Kernel.getSystemParty()); - // register JSP as index page with navigation + + /* Additional function: register JSP as index page with + * navigation */ setupTemplate(); + } }.run(); } /** + * Provides the of FOI contenttype property definitions to the + * parent class Loader process implementing it's abstract method. * - * @return + * The file defines the types name as displayed in content center + * select box and the authoring steps. These are loaded into database. + * + * @return String Atring Array of fully qualified file names */ public String[] getTypes() { return TYPES; Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -22,8 +22,6 @@ import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.FormSectionEvent; -// import com.arsdigita.camden.cms.contenttypes.FoiUtil; -// import com.arsdigita.categorization.Category; import com.arsdigita.cms.ContentBundle; import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentSection; @@ -33,7 +31,6 @@ import com.arsdigita.cms.ui.authoring.PageCreate; import com.arsdigita.util.Assert; -import java.math.BigDecimal; import java.util.Date; Deleted: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiFilter.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiFilter.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiFilter.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,262 +0,0 @@ -/* - * Copyright (C) 2005 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * 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.camden.cms.contenttypes.ui; - - -import javax.servlet.ServletException; - -import com.arsdigita.bebop.Component; -import com.arsdigita.bebop.ControlLink; -import com.arsdigita.bebop.DimensionalNavbar; -import com.arsdigita.bebop.Label; -import com.arsdigita.bebop.PageState; -import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.xml.Element; - -/** - * Filter widget to restrict the displayed Foi items - * by their status (past, current, forthcoming). - * - * - */ -public class FoiFilter extends DimensionalNavbar { - - public static final String EVENT_FILTER = "filter"; - public static final String FILTER_ALL = "all"; - - public static final String FILTER_categoryOption1="Adult care services"; - public static final String FILTER_categoryOption2="Children and families services"; - public static final String FILTER_categoryOption3="Community safety and emergencies"; - public static final String FILTER_categoryOption4="Consumer affairs"; - public static final String FILTER_categoryOption5="Council management"; - public static final String FILTER_categoryOption6="Council property"; - public static final String FILTER_categoryOption7="Democracy"; - public static final String FILTER_categoryOption8="Economic development"; - public static final String FILTER_categoryOption9="Education and skills"; - public static final String FILTER_categoryOption10="Environmental protection"; - public static final String FILTER_categoryOption11="Finance"; - public static final String FILTER_categoryOption12="Health and Safety"; - public static final String FILTER_categoryOption13="Housing"; - public static final String FILTER_categoryOption14="Employment, jobs, and careers"; - public static final String FILTER_categoryOption15="Information and communication technology"; - public static final String FILTER_categoryOption16="Information Management"; - public static final String FILTER_categoryOption17="Legal Services"; - public static final String FILTER_categoryOption18="Leisure and culture"; - public static final String FILTER_categoryOption19="Planning and building control"; - public static final String FILTER_categoryOption20="Procurement"; - public static final String FILTER_categoryOption21="Registration and coroners"; - public static final String FILTER_categoryOption22="Risk management and insurance"; - public static final String FILTER_categoryOption23="Transport and infrastructure"; - public static final String FILTER_categoryOption24="Waste Management"; - - - private FoiTable m_table; - - public FoiFilter() { - setDelimiter(" | "); - } - - public void addWidgets(final FoiTable table) { - m_table = table; - - ControlLink categoryOption1 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption1")), - FILTER_categoryOption1, - this); - add(categoryOption1); - - ControlLink categoryOption2 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption2")), - FILTER_categoryOption2, - this); - add(categoryOption2); - ControlLink categoryOption3 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption3")), - FILTER_categoryOption3, - this); - add(categoryOption3); - - ControlLink categoryOption4 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption4")), - FILTER_categoryOption4, - this); - add(categoryOption4); - - ControlLink categoryOption5 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption5")), - FILTER_categoryOption5, - this); - add(categoryOption5); - - ControlLink categoryOption6 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption6")), - FILTER_categoryOption6, - this); - add(categoryOption6); - - ControlLink categoryOption7 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption7")), - FILTER_categoryOption7, - this); - add(categoryOption7); - - ControlLink categoryOption8 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption8")), - FILTER_categoryOption8, - this); - add(categoryOption8); - - ControlLink categoryOption9 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption9")), - FILTER_categoryOption9, - this); - add(categoryOption9); - - ControlLink categoryOption10 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption10")), - FILTER_categoryOption10, - this); - add(categoryOption10); - - ControlLink categoryOption11 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption11")), - FILTER_categoryOption11, - this); - add(categoryOption11); - - ControlLink categoryOption12 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption12")), - FILTER_categoryOption12, - this); - add(categoryOption12); - - ControlLink categoryOption13 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption13")), - FILTER_categoryOption13, - this); - add(categoryOption13); - - ControlLink categoryOption14 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption14")), - FILTER_categoryOption14, - this); - add(categoryOption14); - - ControlLink categoryOption15 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption15")), - FILTER_categoryOption15, - this); - add(categoryOption15); - - ControlLink categoryOption16 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption16")), - FILTER_categoryOption16, - this); - add(categoryOption16); - - ControlLink categoryOption17 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption17")), - FILTER_categoryOption17, - this); - add(categoryOption17); - - - ControlLink categoryOption18 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption18")), - FILTER_categoryOption18, - this); - add(categoryOption18); - - ControlLink categoryOption19 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption19")), - FILTER_categoryOption19, - this); - add(categoryOption19); - - ControlLink categoryOption20 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption20")), - FILTER_categoryOption20, - this); - add(categoryOption20); - - - ControlLink categoryOption21 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption21")), - FILTER_categoryOption21, - this); - add(categoryOption21); - - ControlLink categoryOption22 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption22")), - FILTER_categoryOption22, - this); - add(categoryOption22); - - ControlLink categoryOption23 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption23")), - FILTER_categoryOption23, - this); - add(categoryOption23); - - - ControlLink categoryOption24 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption24")), - FILTER_categoryOption24, - this); - add(categoryOption24); - - } - - - public void respond(PageState state) throws ServletException { - if (EVENT_FILTER.equals(state.getControlEventName())) - m_table.setFilter(state, state.getControlEventValue()); - else - super.respond(state); - } - - - private class FilterLink extends ControlLink { - - private String m_linkFilter; - private FoiFilter m_parent; - - public FilterLink(Component child, String filter, FoiFilter parent) { - super(child); - m_linkFilter = filter; - m_parent = parent; - } - - public void setControlEvent(PageState s) { - s.setControlEvent(m_parent, EVENT_FILTER, m_linkFilter); - } - - public void generateXML(PageState state, Element parent) { - if (m_linkFilter.equals(m_table.getFilter(state))) { - // If this represents the current filter, don't display a link. - // Instead, display this link's child component. - firePrintEvent(state).getChild().generateXML(state, parent); - } else - super.generateXML(state, parent); - } - - - } - -} Deleted: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2005 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * 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.camden.cms.contenttypes.ui; - -// import com.arsdigita.camden.cms.contenttypes.Foi; -// import com.arsdigita.globalization.GlobalizedMessage; -// import com.arsdigita.kernel.ACSObject; -// import com.arsdigita.navigation.DataCollectionRenderer; -import com.arsdigita.navigation.Navigation; -import com.arsdigita.navigation.ui.AbstractObjectList; -import com.arsdigita.persistence.DataCollection; -// import com.arsdigita.persistence.DataObject; -import com.arsdigita.persistence.DataQuery; -import com.arsdigita.persistence.DataQueryDataCollectionAdapter; -import com.arsdigita.persistence.SessionManager; -import com.arsdigita.xml.Element; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * To be used as a component in a JSP page, this class displays the latest - * Foi content items, sorted by descending publication date. - * - * @author Rahul Shukla - * @version $Id: FoiList.java 31 2005-08-04 15:56:42Z rahul shukla $ - */ -public class FoiList extends AbstractObjectList { - - private int m_maxCount = 5; - - public FoiList() { - } - - /** - * Sets the maximum number of Foi items that will be displayed. - * Also sets the page size to ensure that no pagination occurs. - */ - public void setMaxCount(int maxCount) { - m_maxCount = maxCount; - getRenderer().setPageSize(m_maxCount); - } - - /** - * - * @param request - * @param response - * @return - */ - @Override - protected DataCollection getObjects(HttpServletRequest request, - HttpServletResponse response) { - - DataQuery query = SessionManager.getSession().retrieveQuery( - "com.arsdigita.camden.cms.contenttypes.getLatestFoi"); - - return new DataQueryDataCollectionAdapter(query, "foi") { - int i = 0; - @Override - public void reset() { - i = 0; - super.reset(); - } - @Override - public void rewind() { - i = 0; - super.rewind(); - } - @Override - public boolean next() { - boolean hasNext = super.next(); - if (++i > m_maxCount) { - close(); - hasNext = false; - } - return hasNext; - } - }; - } - - /** - * - * @param request - * @param response - * @return - */ - public Element generateXML(HttpServletRequest request, - HttpServletResponse response) { - Element content = Navigation.newElement("simpleObjectList"); - - content.addContent(generateObjectListXML(request, response)); - - return content; - } - -} Deleted: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2005 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * 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.camden.cms.contenttypes.ui; - -import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.camden.cms.foi.FoiApp; -import com.arsdigita.categorization.Category; -import com.arsdigita.categorization.CategoryCollection; -import com.arsdigita.kernel.ACSObject; -import com.arsdigita.navigation.AbstractNavigationModel; - -import java.lang.reflect.Array; - -/** - * <p>NavigationModel to be used by the Camden Fois JSPs. - * It provides the Fois category to the Path and Menu - * components from com.arsdigita.london.navigation.</p> - * - * <p>For this to work, a domain mapping has to be created for - * the Fois application at /ccm/admin/terms/. The - * Fois category has be created as a Term in this domain, - * and its name has to be set as the fois_term_name - * configuration parameter (default "Foi"). Finally, - * you have to map the Fois Index navigation template - * to the Fois category at /ccm/navigation/admin/</p> - * - * <p>When the term and the mapping are created, the server has to - * be restarted for the changes to take effect.</p> - * - * <p>In the JSP, use the static retrieve() method to get an - * instance of this class.</p> - * - */ -public class FoiNavigationModel extends AbstractNavigationModel { - - private Category m_rootCategory; - private Category m_tipCategory; - static private FoiNavigationModel m_model; - - private FoiNavigationModel() { - FoiApp app = FoiApp.retrieveApplication(); - - if (app != null) { - m_rootCategory = Category.getRootForObject(app); - } - - if (m_rootCategory != null) { - String foiTermUrl = - FoiUtil.getConfig().getFoiTermURL(); - - CategoryCollection cats = m_rootCategory.getDescendants(); - cats.addEqualsFilter(Category.URL, foiTermUrl); - if (cats.next()) { - m_tipCategory = cats.getCategory(); - cats.close(); - } - } - } - - protected ACSObject loadObject() { - return null; - } - - protected Category loadCategory() { - return m_tipCategory; - } - - protected Category[] loadCategoryPath() { - if (m_tipCategory == null) { - return null; - } - - CategoryCollection ascendants = - loadCategory().getDefaultAscendants(); - - Category[] result = - (Category[])Array.newInstance(Category.class, (int)ascendants.size()); - while (ascendants.next()) { - result[ascendants.getPosition()-1] = ascendants.getCategory(); - } - - return result; - } - - protected Category loadRootCategory() { - return m_rootCategory; - } - - static public FoiNavigationModel retrieve() { - if (m_model == null) { - m_model = new FoiNavigationModel(); - } - - return m_model; - } - -} Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesForm.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesForm.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesForm.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -16,9 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ + package com.arsdigita.camden.cms.contenttypes.ui; -import java.util.Date; import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.Label; @@ -29,16 +29,11 @@ import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.bebop.form.TextArea; import com.arsdigita.bebop.parameters.ParameterModel; -import com.arsdigita.bebop.parameters.StringInRangeValidationListener; import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.camden.cms.contenttypes.Foi; import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.cms.ContentPage; -import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.BasicPageForm; -import com.arsdigita.cms.util.GlobalizationUtil; -import com.arsdigita.util.Assert; /** * CMS authoring form for the Camden Foi's content type. @@ -96,12 +91,14 @@ foi.setDescription( (String) data.get( DESCRIPTION ) ); foi.save(); } - if (m_step != null) + if (m_step != null) { m_step.maybeForwardToNextStep(state); + } } + @Override protected void addWidgets() { super.addWidgets(); Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesStep.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesStep.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesStep.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -50,7 +50,9 @@ BasicPageForm editSheet; editSheet = new FoiPropertiesForm( itemModel, this ); - add( EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), + add( EDIT_SHEET_NAME, + "Edit", + new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton() ); setDisplayComponent( getPropertySheet( itemModel ) ); @@ -65,12 +67,16 @@ * of the release */ public static Component getPropertySheet( ItemSelectionModel itemModel ) { - DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( itemModel ); + DomainObjectPropertySheet sheet = + new DomainObjectPropertySheet( itemModel ); - sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), ContentItem.NAME); + sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), + ContentItem.NAME); //This is added for the description - sheet.add(GlobalizationUtil.globalize("Description"), Foi.DESCRIPTION); - sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), ContentPage.TITLE); + sheet.add(GlobalizationUtil.globalize("Description"), + Foi.DESCRIPTION); + sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), + ContentPage.TITLE); return sheet; } Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeForm.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeForm.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeForm.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -27,23 +27,20 @@ import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSubmissionListener; -import com.arsdigita.bebop.form.Date; -import com.arsdigita.bebop.form.MultipleSelect; -import com.arsdigita.bebop.form.Option; import com.arsdigita.bebop.form.SingleSelect; import com.arsdigita.bebop.form.TextField; import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; -import com.arsdigita.bebop.parameters.TrimmedStringParameter; import com.arsdigita.camden.cms.contenttypes.Foi; import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.camden.cms.contenttypes.ui.FoiPublicationSchemeStep; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.BasicItemForm; /** * CMS authoring form for the Camden Foi content type. + * + * Usage defined in contenttype properties definition file (cf. FoiLoader). * * @author Rahul Shukla * @version $Id: FoiPublicationSchemeForm.java 27 2005-08-03 17:12:42Z rahul shukla $ @@ -103,8 +100,9 @@ foi.setCost(data.getString(Foi.COST)); - if (m_step != null) - m_step.maybeForwardToNextStep(state); + if (m_step != null) { + m_step.maybeForwardToNextStep(state); + } } @@ -136,6 +134,7 @@ } + @Override protected void addWidgets() { add(new Label(FoiUtil.globalize("categoryFoi"))); Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeStep.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeStep.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeStep.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -16,10 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ + package com.arsdigita.camden.cms.contenttypes.ui; -import java.util.Date; - import com.arsdigita.bebop.Component; import com.arsdigita.bebop.PageState; import com.arsdigita.camden.cms.contenttypes.Foi; @@ -29,13 +28,9 @@ import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; -import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.domain.DomainObject; -import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet.AttributeFormatter; -import com.arsdigita.xml.Formatter; -import com.arsdigita.xml.formatters.DateFormatter; /** * CMS authoring step for the Camden Fois content type. Deleted: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,295 +0,0 @@ -/* - * Copyright (C) 2005 Red Hat Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * 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.camden.cms.contenttypes.ui; - -import com.arsdigita.bebop.Component; -import com.arsdigita.bebop.Label; -import com.arsdigita.bebop.Link; -import com.arsdigita.bebop.Page; -import com.arsdigita.bebop.PageState; -import com.arsdigita.bebop.Paginator; -import com.arsdigita.bebop.Table; -import com.arsdigita.bebop.parameters.StringParameter; -import com.arsdigita.bebop.table.TableCellRenderer; -import com.arsdigita.camden.cms.contenttypes.Foi; -import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.cms.ContentItem; -import com.arsdigita.cms.ContentPage; -import com.arsdigita.navigation.Navigation; -import com.arsdigita.persistence.DataQuery; -import com.arsdigita.persistence.OID; -import com.arsdigita.persistence.SessionManager; -import com.arsdigita.toolbox.ui.DataQueryBuilder; -import com.arsdigita.toolbox.ui.DataTable; -// import com.arsdigita.toolbox.ui.DateTableCellRenderer; -import com.arsdigita.toolbox.ui.QueryEvent; -import com.arsdigita.toolbox.ui.QueryListener; -import com.arsdigita.util.Assert; -import com.arsdigita.web.ParameterMap; -import com.arsdigita.web.URL; -import com.arsdigita.web.Web; - -import java.math.BigDecimal; - -import org.apache.log4j.Logger; - - -/** - * To be used as a component in a JSP page, this class displays all published - * Foi items in a sortable and paginated table. - * - * @author Rahul Shukla - * @version $Id: FoiTable.java 18 2006-11-10 09:17:28Z rahul shukla $ - */ -public class FoiTable extends DataTable { - private static final Logger s_log = - Logger.getLogger(FoiTable.class.getName()); - - public static final int DEFAULT_PAGE_SIZE =10; - - private StringParameter m_dirParam; - private StringParameter m_filter; - - public FoiTable() { - super(new DataQueryBuilder() { - private boolean m_locked = false; - - public String getKeyColumn() { - return Foi.ID; - } - - public DataQuery makeDataQuery(DataTable t, PageState s) { - DataQuery query = SessionManager.getSession().retrieve( - Foi.BASE_DATA_OBJECT_TYPE); - query.addEqualsFilter(ContentItem.VERSION, ContentItem.LIVE); - return query; - } - - public boolean isLocked() { - return m_locked; - } - - public void lock() { - m_locked = true; - } - }); - - m_dirParam = new StringParameter(DIRECTION); - m_dirParam.setDefaultValue(ASCENDING); - - setResourceBundle(FoiUtil.BUNDLE_NAME); - - - - - // In the Title column, we display a link - // to view the Foi item. - addColumn("Title", ContentPage.TITLE, true, - new TableCellRenderer() { - public Component getComponent(Table table, PageState state, - Object value, boolean isSelected, Object key, int row, int column) { - OID oid = - new OID(Foi.BASE_DATA_OBJECT_TYPE, (BigDecimal)key); - - - URL here = Web.getContext().getRequestURL(); - URL url = - new URL(here.getScheme(), - here.getServerName(), - here.getServerPort(), - "", - "", - Navigation.redirectURL(oid), - new ParameterMap()); - - return new Link((String) value, url); - } - }); - - - addColumn("availableFormat", Foi.AVAILABLE_FORMAT, true, new AvailableFormatCellRenderer()); - addColumn("contactDetail", Foi.CONTACT_DETAIL, true, new ContactDetailTableCellRenderer()); - addColumn("cost", Foi.COST); - - - setDefaultOrder(ContentPage.TITLE); - setDefaultOrderDirection(ASCENDING); - - m_filter = new StringParameter("filter"); - m_filter.setDefaultValue(FoiFilter.FILTER_ALL);// this means all the foi items would be displyed by default - - addQueryListener(new QueryListener() { - public void queryPending(QueryEvent e) { - - - DataQuery q = e.getDataQuery(); - PageState s = e.getPageState(); - String filter = (String)s.getValue(m_filter); - - //This is "like clause" which is been put into the query which filters out - //the result so that we can get the result according to the clicked PSCL/class which - //is displayed at the top of the table. - if (FoiFilter.FILTER_categoryOption1.equals(filter)) - q.addFilter("categoryFoi like '1'"); - else if (FoiFilter.FILTER_categoryOption2.equals(filter)) - q.addFilter("categoryFoi like '2'"); - else if (FoiFilter.FILTER_categoryOption3.equals(filter)) - q.addFilter("categoryFoi like '3'"); - else if (FoiFilter.FILTER_categoryOption4.equals(filter)) - q.addFilter("categoryFoi like '4'"); - else if (FoiFilter.FILTER_categoryOption5.equals(filter)) - q.addFilter("categoryFoi like '5'"); - else if (FoiFilter.FILTER_categoryOption6.equals(filter)) - q.addFilter("categoryFoi like '6'"); - else if (FoiFilter.FILTER_categoryOption7.equals(filter)) - q.addFilter("categoryFoi like '7'"); - else if (FoiFilter.FILTER_categoryOption8.equals(filter)) - q.addFilter("categoryFoi like '8'"); - else if (FoiFilter.FILTER_categoryOption9.equals(filter)) - q.addFilter("categoryFoi like '9'"); - else if (FoiFilter.FILTER_categoryOption10.equals(filter)) - q.addFilter("categoryFoi like '10'"); - else if (FoiFilter.FILTER_categoryOption11.equals(filter)) - q.addFilter("categoryFoi like '11'"); - else if (FoiFilter.FILTER_categoryOption12.equals(filter)) - q.addFilter("categoryFoi like '12'"); - else if (FoiFilter.FILTER_categoryOption13.equals(filter)) - q.addFilter("categoryFoi like '13'"); - else if (FoiFilter.FILTER_categoryOption14.equals(filter)) - q.addFilter("categoryFoi like '14'"); - else if (FoiFilter.FILTER_categoryOption15.equals(filter)) - q.addFilter("categ... [truncated message content] |
From: <pb...@fe...> - 2013-01-07 22:07:04
|
Author: pboy Date: 2013-01-07 22:06:54 +0000 (Mon, 07 Jan 2013) New Revision: 2452 Added: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources.properties contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources_de.properties contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources_en.properties contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/util/ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/util/EFormGlobalizedMsg.java contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/util/EFormResourceBundle.java contrib/camden/ccm-lbc-eforms/src/com/arsdigita/cms/ Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EForm.java contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormLoader.java contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertiesStep.java contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertyForm.java Log: Migration to version 2.0 basically done, smoke test successful. Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EForm.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EForm.java 2013-01-06 15:54:16 UTC (rev 2451) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EForm.java 2013-01-07 22:06:54 UTC (rev 2452) @@ -18,11 +18,11 @@ */ package com.arsdigita.camden.cms.contenttypes; +import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentType; -import com.arsdigita.cms.ContentPage; import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.OID; -import com.arsdigita.persistence.DataObject; import java.math.BigDecimal; @@ -66,27 +66,47 @@ } } + /** + * Constructor. + * @param id + * @throws DataObjectNotFoundException + */ public EForm( BigDecimal id ) throws DataObjectNotFoundException { this( new OID( BASE_DATA_OBJECT_TYPE, id ) ); } + /** + * Constructor. + * @param id + * @throws DataObjectNotFoundException + */ public EForm( OID id ) throws DataObjectNotFoundException { super( id ); } + /** + * Constructor + * @param obj + */ public EForm( DataObject obj ) { super( obj ); } + /** + * Constructor. + * @param type + */ public EForm( String type ) { super( type ); } /** - * TODO: Add documentation! + * Retrieve the target URL for this e-Form object. + * + * TODO: Add detailed documentation! * @return */ public String getURL() { @@ -94,7 +114,8 @@ } /** - * TODO: Add documentation! + * Set the target URL for this e-Form object. + * TODO: Add detaileddocumentation! * @return */ public void setURL( String url ) { @@ -102,7 +123,9 @@ } /** - * TODO: Add documentation! + * Retrieve the description for this e-Form object. + * + * TODO: Add detailed documentation! * @return */ @Override @@ -111,7 +134,9 @@ } /** - * TODO: Add documentation! + * Set the description for this e-Form object. + * + * TODO: Add detailed documentation! * @return */ @Override Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormLoader.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormLoader.java 2013-01-06 15:54:16 UTC (rev 2451) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormLoader.java 2013-01-07 22:06:54 UTC (rev 2452) @@ -16,41 +16,44 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ + package com.arsdigita.camden.cms.contenttypes; import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentType; import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader; import com.arsdigita.cms.lifecycle.LifecycleDefinition; -import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.ResourceParameter; -import com.arsdigita.util.parameter.URLParameter; import com.arsdigita.workflow.simple.WorkflowTemplate; import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; /** - * Loads the database after the e-Form content type data model has been - * created. + * Loader executes nonrecurring once at install time and loads the e-Form + * contenttype package persistently into database. * - * Executes nonrecurring at install time and loads (installs and initializes) - * the ccm-lbc-eforms package persistently into database. + * It uses the base class to create the database schema and the required + * table entries for the contenttype. + * + * NOTE: Configuration parameters used at load time MUST be part of Loader + * class and can not delegated to a Config object (derived from AbstractConfig). + * They will (and can) not be persisted into an registry object (file). * * @author Alan Pevec * @version $Id$ */ public class EFormLoader extends AbstractContentTypeLoader { + /** Defines the xml file containing the EForm content types property + * definitions. */ private static final String[] TYPES = { "/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/EForm.xml" }; - // URL resource parameter removed! - // private URLParameter m_template; - /** Create parameter for... */ + /** + * Configures a special default template to register at install time. + */ private final Parameter m_template = new ResourceParameter( "com.arsdigita.camden.cms.contenttypes.eform.defaulttemplate", Parameter.REQUIRED, @@ -58,30 +61,30 @@ ); /** - * Constructor + * Constructor, just registers Loader parameter. */ public EFormLoader() { -/* URL resource protocol removed. See cms.CMSConfig for details. - try { - m_template = new URLParameter - ("com.arsdigita.camden.cms.contenttypes.eform.defaulttemplate", - Parameter.REQUIRED, - new URL(null, - "resource:///WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes" + - "/eform-item.jsp")); - } catch (MalformedURLException ex) { - throw new UncheckedWrapperException("cannot parse url", ex); - } -*/ register(m_template); + } + /** + * Provides the of EForm contenttype property definitions. + * + * The file defines the types name as displayed in content center + * select box and the authoring steps. These are loaded into database. + * + * Implements the method of the parent class. + * + * @return String array of fully qualified file names + */ public String[] getTypes() { return TYPES; } /** + * Overwrites base class to register its own specific default template. * * @param section * @param type @@ -97,7 +100,6 @@ setDefaultTemplate("EFormDefaultTemplate", "eform-item", - // (URL)get(m_template), (InputStream) get(m_template), section, type,ld, wf); Added: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources.properties =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources.properties (rev 0) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources.properties 2013-01-07 22:06:54 UTC (rev 2452) @@ -0,0 +1,9 @@ +# EventResources.properties +# +eform.authoring.basic_properties.description=Edit the title, name, location (URL), and description +# +camden.cms.contenttypes.eform.name=Name (URL): +camden.cms.contenttypes.eform.title=Title: +# +camden.cms.contenttypes.eform.description=Form description: +camden.cms.contenttypes.eform.location=Location (remote URL): Added: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources_de.properties =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources_de.properties (rev 0) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources_de.properties 2013-01-07 22:06:54 UTC (rev 2452) @@ -0,0 +1,11 @@ +# EventResources_de.properties +# Alle deutschem Umlaute muessen als UTF-8 eingetragen werden: +eform.authoring.basic_properties.description=Bearbeitung des Titels, Namens, Ort (URL) und Beschreibung +# +# useless here, must be transferred to CMSResources +# +camden.cms.contenttypes.eform.name=Name (URL): +camden.cms.contenttypes.eform.title=Titel: +# +camden.cms.contenttypes.eform.description=Formularbeschreibung: +camden.cms.contenttypes.eform.location=Ort (Ziel URL): Added: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources_en.properties =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources_en.properties (rev 0) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormResources_en.properties 2013-01-07 22:06:54 UTC (rev 2452) @@ -0,0 +1,9 @@ +# EventResources.properties +# +eform.authoring.basic_properties.description=Edit the title, name, location (URL), and description +# +camden.cms.contenttypes.eform.name=Name (URL): +camden.cms.contenttypes.eform.title=Title: +# +camden.cms.contenttypes.eform.description=Additional date description: +camden.cms.contenttypes.eform.location=Location (remote URL): Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertiesStep.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertiesStep.java 2013-01-06 15:54:16 UTC (rev 2451) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertiesStep.java 2013-01-07 22:06:54 UTC (rev 2452) @@ -20,6 +20,7 @@ import com.arsdigita.bebop.Component; import com.arsdigita.camden.cms.contenttypes.EForm; +import com.arsdigita.camden.cms.contenttypes.util.EFormGlobalizedMsg; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; @@ -29,17 +30,22 @@ /** - * Authoring step to edit the simple attributes of the EForm content + * Authoring step to view/edit the simple attributes of the EForm content * type (and its subclasses). */ -public class EFormPropertiesStep - extends SimpleEditStep { +public class EFormPropertiesStep extends SimpleEditStep { /** The name of the editing sheet added to this step */ public static final String EDIT_SHEET_NAME = "edit"; + /** + * Constructor. + * + * @param itemModel + * @param parent + */ public EFormPropertiesStep( ItemSelectionModel itemModel, - AuthoringKitWizard parent ) { + AuthoringKitWizard parent ) { super( itemModel, parent ); BasicPageForm editSheet; @@ -54,7 +60,8 @@ /** * Returns a component that displays the properties of the - * EForm specified by the ItemSelectionModel passed in. + * EForm content item specified by the ItemSelectionModel passed in. + * * @param itemModel The ItemSelectionModel to use * @pre itemModel != null * @return A component to display the state of the basic properties @@ -63,14 +70,14 @@ * Method add deprecated, use add(GlobalizedMessage label, String attribute) * instead (but probably Camden doesn't use globalized strings). */ - public static Component getEFormPropertySheet( ItemSelectionModel - itemModel ) { + public static Component getEFormPropertySheet(ItemSelectionModel itemModel ) { + DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( itemModel ); - sheet.add( "Name:", EForm.NAME ); - sheet.add( "Title:", EForm.TITLE ); - sheet.add( "URL:", EForm.URL ); - sheet.add( "Description:", EForm.DESCRIPTION ); + sheet.add( EFormGlobalizedMsg.getName(), EForm.NAME ); + sheet.add( EFormGlobalizedMsg.getTitle(), EForm.TITLE ); + sheet.add( EFormGlobalizedMsg.getLocation(), EForm.URL ); + sheet.add( EFormGlobalizedMsg.getDescription(), EForm.DESCRIPTION ); return sheet; } Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertyForm.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertyForm.java 2013-01-06 15:54:16 UTC (rev 2451) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertyForm.java 2013-01-07 22:06:54 UTC (rev 2452) @@ -26,43 +26,59 @@ import com.arsdigita.bebop.form.TextArea; import com.arsdigita.bebop.form.TextField; import com.arsdigita.camden.cms.contenttypes.EForm; +// import com.arsdigita.camden.cms.contenttypes.util.EFormGlobalizationUtil; +import com.arsdigita.camden.cms.contenttypes.util.EFormGlobalizedMsg; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.BasicPageForm; /** - * Form to edit the basic properties of an EForm. This form can be - * extended to create forms for EForm subclasses. + * Form to edit the basic properties of an EForm. + * + * Used by <code>EFormPropertiesStep</code> authoring kit step. + * <br /> + * This form can be extended to create forms for EForm subclasses. */ public class EFormPropertyForm extends BasicPageForm implements FormProcessListener, FormInitListener { + /** Name of this form */ + public static final String ID = "eform_edit"; // formerly "eFormEdit" + private TextField m_url; private TextArea m_description; /** * Creates a new form to edit the EForm object specified * by the item selection model passed in. + * * @param itemModel The ItemSelectionModel to use to obtain the * EForm to work on */ public EFormPropertyForm(ItemSelectionModel itemModel) { - super("eFormEdit", itemModel); + super(ID, itemModel); } /** - * Adds widgets to the form. + * Adds widgets to the forms basic properties (name and title). */ @Override protected void addWidgets() { super.addWidgets(); - add(new Label("URL:")); + add(new Label(EFormGlobalizedMsg.getLocation()) ); + // add(new Label( + // (String) EFormGlobalizationUtil + // .globalize("camden.cms.contenttypes.eform.location").localize()) + // ); m_url = new TextField(EForm.URL); m_url.setSize(40); add(m_url); - add(new Label("Description:")); + add(new Label(EFormGlobalizedMsg.getDescription()) ); + // (String) EFormGlobalizationUtil + // .globalize("camden.cms.contenttypes.eform.description").localize()) + // ); m_description = new TextArea(EForm.DESCRIPTION, 5, 40, TextArea.SOFT); add(m_description); } Added: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/util/EFormGlobalizedMsg.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/util/EFormGlobalizedMsg.java (rev 0) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/util/EFormGlobalizedMsg.java 2013-01-07 22:06:54 UTC (rev 2452) @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2013 University of Bremen. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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.camden.cms.contenttypes.util; + +import com.arsdigita.globalization.GlobalizedMessage; + +/** + * Provides simplified methods to acquire a GlobalizedMessage object + * for EForm's labels, strings and other messages. + * + * @author pb + */ +public class EFormGlobalizedMsg { + + /** Name of the Java class to handle Event's globalisation. */ + final public static String BUNDLE_NAME = + "com.arsdigita.camden.cms.contenttypes.util.EFormResourceBundle"; + + /** + * This returns a localized globalized message for the NAME entry field + * using the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage getTitle() { + return new GlobalizedMessage( + "camden.cms.contenttypes.eform.title", + BUNDLE_NAME); + } + + /** + * This returns a localized globalized message for the NAME entry field + * using the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage getLocation() { + return new GlobalizedMessage( + "camden.cms.contenttypes.eform.location", + BUNDLE_NAME); + } + + /** + * This returns a localized globalized message for the NAME entry field + * using the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage getDescription() { + return new GlobalizedMessage( + "camden.cms.contenttypes.eform.description", + BUNDLE_NAME); + } + + /** + * This returns a localized globalized message for the NAME entry field + * using the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage getName() { + return new GlobalizedMessage( + "camden.cms.contenttypes.eform.name", + BUNDLE_NAME); + } + + /** + * This returns a localized globalized message based on its key and using + * the type specific bundle, BUNDLE_NAME + */ + public static GlobalizedMessage get(String key) { + + return new GlobalizedMessage(key, BUNDLE_NAME); + + } + + +} Added: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/util/EFormResourceBundle.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/util/EFormResourceBundle.java (rev 0) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/util/EFormResourceBundle.java 2013-01-07 22:06:54 UTC (rev 2452) @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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.camden.cms.contenttypes.util; + +import com.arsdigita.cms.CMSGlobalized; +import com.arsdigita.globalization.ChainedResourceBundle; + +import java.util.PropertyResourceBundle; + +/** + * Resource Bundle used in UI for Event ContentType. + * + * @author Shashin Shinde (ss...@re...) + */ +public class EFormResourceBundle extends ChainedResourceBundle + implements CMSGlobalized { + + public final static String EVENT_BUNDLE_NAME = + "com.arsdigita.camden.cms.contenttypes.EFormResources"; + + public EFormResourceBundle() { + super(); + addBundle((PropertyResourceBundle)getBundle(EVENT_BUNDLE_NAME)); + addBundle((PropertyResourceBundle)getBundle(BUNDLE_NAME)); + } +} |
From: <pb...@fe...> - 2013-01-06 15:54:25
|
Author: pboy Date: 2013-01-06 15:54:16 +0000 (Sun, 06 Jan 2013) New Revision: 2451 Removed: contrib/camden/ccm-lbc-aplaws-public/ Log: Deleted, integrated into ccm-lbc-aplaws. |
From: <pb...@fe...> - 2012-12-30 09:54:33
|
Author: pboy Date: 2012-12-30 09:54:20 +0000 (Sun, 30 Dec 2012) New Revision: 2449 Modified: contrib/camden/ccm-lbc-retention/src/com/arsdigita/camden/cms/contenttypes/RetentionInitializer.java Log: First step migration to versin 2.0.x NOT workable yet! Modified: contrib/camden/ccm-lbc-retention/src/com/arsdigita/camden/cms/contenttypes/RetentionInitializer.java =================================================================== --- contrib/camden/ccm-lbc-retention/src/com/arsdigita/camden/cms/contenttypes/RetentionInitializer.java 2012-12-30 09:52:52 UTC (rev 2448) +++ contrib/camden/ccm-lbc-retention/src/com/arsdigita/camden/cms/contenttypes/RetentionInitializer.java 2012-12-30 09:54:20 UTC (rev 2449) @@ -16,19 +16,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ + package com.arsdigita.camden.cms.contenttypes; -import java.util.Calendar; -import java.util.Date; -import java.util.Timer; -import java.util.TimerTask; import com.arsdigita.cms.contenttypes.ContentTypeInitializer; -import com.arsdigita.kernel.Kernel; -import com.arsdigita.kernel.KernelExcursion; -import com.arsdigita.runtime.LegacyInitEvent; -import com.arsdigita.search.MetadataProviderRegistry; + /** * Runtime initialization for the Retention content type. * @@ -36,21 +30,18 @@ * @version $Id: RetentionInitializer.java 24 2006-11-02 14:14:14Z rahul shukla $ */ public class RetentionInitializer extends ContentTypeInitializer { - public final static String versionId = "$Id: RetentionInitializer.java 24 2005-08-02 14:14:14Z clasohm $"; - public void init(LegacyInitEvent evt) { - super.init(evt); - } - public RetentionInitializer() { - super("ccm-ldn-camden-retention.pdl.mf", Retention.BASE_DATA_OBJECT_TYPE); + super("ccm-lbc-retention.pdl.mf", Retention.BASE_DATA_OBJECT_TYPE); } + @Override public String getTraversalXML() { return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Retention.xml"; } + @Override public String[] getStylesheets() { return new String[] { "/static/content-types/com/arsdigita/camden/cms/contenttypes/Retention.xsl" }; } |
Author: pboy Date: 2012-12-30 09:52:52 +0000 (Sun, 30 Dec 2012) New Revision: 2448 Added: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/ contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/ contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.config contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/FoiApp.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Initializer.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Loader.java contrib/camden/ccm-lbc-foi/web/templates/ contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/ contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/ contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/deleted.jsp contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/index.jsp contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/index.jsp contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/navigation/ contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/navigation/foi-indexpage.jsp contrib/camden/ccm-lbc-foi/web/themes/ contrib/camden/ccm-lbc-foi/web/themes/heirloom/ contrib/camden/ccm-lbc-foi/web/themes/heirloom/contenttypes/ contrib/camden/ccm-lbc-foi/web/themes/heirloom/contenttypes/Foi.xsl Removed: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/FoiApp.pdl contrib/camden/ccm-lbc-foi/sql/ccm-ldn-camden-foi/ contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.config contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.load contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.upgrade contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiApp.java contrib/camden/ccm-lbc-foi/web/packages/ contrib/camden/ccm-lbc-foi/web/static/ Modified: contrib/camden/ccm-lbc-foi/application.xml contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/Foi.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiConfig.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiUtil.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java Log: First step migration to versin 2.0.x NOT workable yet! Modified: contrib/camden/ccm-lbc-foi/application.xml =================================================================== --- contrib/camden/ccm-lbc-foi/application.xml 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/application.xml 2012-12-30 09:52:52 UTC (rev 2448) @@ -1,17 +1,17 @@ <?xml version="1.0"?> <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" - name="ccm-ldn-camden-foi" + name="ccm-lbc-foi" prettyName="Red Hat CCM Content Types" - version="1.0.4" + version="6.6.0" release="1" webapp="ROOT"> <ccm:dependencies> - <ccm:requires name="ccm-core" version="6.3.3" relation="ge"/> - <ccm:requires name="ccm-cms" version="6.2.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-ldn-aplaws" version="1.9.1" relation="ge"/> - <ccm:requires name="ccm-ldn-navigation" version="1.4.4" relation="ge"/> <ccm:requires name="ccm-ldn-util" version="1.4.1" relation="ge"/> - <ccm:requires name="ccm-ldn-rss" version="1.4.2" relation="ge"/> + <ccm:requires name="ccm-navigation" version="6.6.0" relation="ge"/> + <ccm:requires name="ccm-rssfeed" version="6.6.0" relation="ge"/> </ccm:dependencies> <ccm:directories> <ccm:directory name="pdl"/> Deleted: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/FoiApp.pdl =================================================================== --- contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/FoiApp.pdl 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/FoiApp.pdl 2012-12-30 09:52:52 UTC (rev 2448) @@ -1,8 +0,0 @@ -model com.arsdigita.camden.cms.contenttypes; - -import com.arsdigita.web.Application; - -object type FoiApp extends Application { - reference key (cam_foi_app.application_id); -} - Copied: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl (from rev 2439, contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/FoiApp.pdl) =================================================================== --- contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl (rev 0) +++ contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,8 @@ +model com.arsdigita.camden.cms.contenttypes; + +import com.arsdigita.web.Application; + +object type FoiApp extends Application { + reference key (cam_foi_app.application_id); +} + Copied: contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.config (from rev 2439, contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.config) =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.config (rev 0) +++ contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.config 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<registry> + <config class="com.arsdigita.camden.cms.contenttypes.FoiConfig" + storage="ccm-lbc-foi/foi.properties"/> +</registry> Copied: contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load (from rev 2439, contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.load) =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load (rev 0) +++ contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,19 @@ +<load> + <requires> + <table name="inits"/> + <table name="acs_objects"/> + <table name="cms_items"/> + <initializer class="com.arsdigita.cms.Initializer"/> + <initializer class="com.arsdigita.navigation.Initializer"/> + </requires> + <provides> + <table name="cam_foi"/> + <initializer class="com.arsdigita.camden.cms.contenttypes.FoiInitializer"/> + <initializer class="com.arsdigita.camden.cms.foi.Initializer"/> + </provides> + <scripts> + <schema directory="ccm-lbc-foi"/> + <data class="com.arsdigita.camden.cms.contenttypes.FoiLoader"/> + <data class="com.arsdigita.camden.cms.foi.Loader"/> + </scripts> +</load> Copied: contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade (from rev 2439, contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.upgrade) =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade (rev 0) +++ contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,3 @@ +<upgrade> + +</upgrade> Deleted: contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.config =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.config 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.config 2012-12-30 09:52:52 UTC (rev 2448) @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<registry> - <config class="com.arsdigita.camden.cms.contenttypes.FoiConfig" - storage="ccm-ldn-camden-foi/foi.properties"/> -</registry> Deleted: contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.load =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.load 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.load 2012-12-30 09:52:52 UTC (rev 2448) @@ -1,17 +0,0 @@ -<load> - <requires> - <table name="inits"/> - <table name="acs_objects"/> - <table name="cms_items"/> - <initializer class="com.arsdigita.cms.Initializer"/> - <initializer class="com.arsdigita.london.navigation.Initializer"/> - </requires> - <provides> - <table name="cam_foi"/> - <initializer class="com.arsdigita.camden.cms.contenttypes.FoiInitializer"/> - </provides> - <scripts> - <schema directory="ccm-ldn-camden-foi"/> - <data class="com.arsdigita.camden.cms.contenttypes.FoiLoader"/> - </scripts> -</load> Deleted: contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.upgrade =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.upgrade 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/ccm-ldn-camden-foi.upgrade 2012-12-30 09:52:52 UTC (rev 2448) @@ -1,3 +0,0 @@ -<upgrade> - -</upgrade> Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/Foi.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/Foi.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/Foi.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -50,20 +50,20 @@ private static final Logger s_log = Logger.getLogger(Foi.class.getName()); - public static final String versionId = "$Id: Foi.java 25 2005-08-03 16:01:08Z rahul shukla $"; - public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.camden.cms.contenttypes.Foi"; + public static String DESCRIPTION="description"; public static final String CATEGORY_FOI = "categoryFoi"; public static final String AVAILABLE_FORMAT = "availableFormat"; public static final String CONTACT_DETAIL = "contactDetail"; public static final String COST = "cost"; private static final String SEPARATOR = "/"; - - public static String DESCRIPTION="description"; + /** + * + */ public Foi() { this(BASE_DATA_OBJECT_TYPE); } @@ -88,6 +88,7 @@ * @return the base PDL object type for this item. Child classes * should override this method to return the correct value. */ + @Override public String getBaseDataObjectType() { return BASE_DATA_OBJECT_TYPE; } @@ -127,7 +128,7 @@ StringTokenizer tok = new StringTokenizer(value,SEPARATOR); if (tok.hasMoreTokens()) { - StringBuffer categoryFois = new StringBuffer(); + StringBuilder categoryFois = new StringBuilder(); categoryFois.append(Foi.getPrettyCategoryFoi(Integer.valueOf(tok.nextToken())).localize()); while (tok.hasMoreTokens()) { categoryFois.append(", ").append(Foi.getPrettyCategoryFoi(Integer.valueOf(tok.nextToken())).localize()); @@ -181,7 +182,7 @@ StringTokenizer tok = new StringTokenizer(value,SEPARATOR); if (tok.hasMoreTokens()) { - StringBuffer availableFormats = new StringBuffer(); + StringBuilder availableFormats = new StringBuilder(); availableFormats.append(Foi.getPrettyAvailableFormat(Integer.valueOf(tok.nextToken())).localize()); while (tok.hasMoreTokens()) { availableFormats.append(", ").append(Foi.getPrettyAvailableFormat(Integer.valueOf(tok.nextToken())).localize()); @@ -231,7 +232,7 @@ StringTokenizer tok = new StringTokenizer(value,SEPARATOR); if (tok.hasMoreTokens()) { - StringBuffer contactDetails = new StringBuffer(); + StringBuilder contactDetails = new StringBuilder(); contactDetails.append(Foi.getPrettyContactDetail(Integer.valueOf(tok.nextToken())).localize()); while (tok.hasMoreTokens()) { contactDetails.append(", ").append(Foi.getPrettyContactDetail(Integer.valueOf(tok.nextToken())).localize()); @@ -257,9 +258,11 @@ //The Description + @Override public String getDescription() { return (String) get(DESCRIPTION); } + @Override public void setDescription(String value) { set(DESCRIPTION, value); } Deleted: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiApp.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiApp.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiApp.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -1,44 +0,0 @@ -package com.arsdigita.camden.cms.contenttypes; - -import com.arsdigita.persistence.DataCollection; -import com.arsdigita.persistence.DataObject; -import com.arsdigita.persistence.OID; -import com.arsdigita.persistence.SessionManager; -import com.arsdigita.web.Application; - - -/** - * This application contains the browsing and alerting UI - * for the Camden Foi's content type. The JSPs can - * be found in web/packages/fois/www. - * - * @author Rahul Shukla - * @version $Id: FoiApp.java 32 2006-10-28 16:06:03Z Rahul Shukla $ - */ -public class FoiApp extends Application { - - public static final String BASE_DATA_OBJECT_TYPE = - "com.arsdigita.camden.cms.contenttypes.FoiApp"; - - public FoiApp(DataObject obj) { - super(obj); - } - - public FoiApp(OID oid) { - super(oid); - } - - static public FoiApp retrieveApplication() { - DataCollection apps = - SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE); - - if (!apps.next()) - return null; - - DataObject obj = apps.getDataObject(); - apps.close(); - - return new FoiApp(obj); - } - -} Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiConfig.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiConfig.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiConfig.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -18,7 +18,6 @@ */ package com.arsdigita.camden.cms.contenttypes; -import com.arsdigita.kernel.KernelHelper; import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.StringParameter; @@ -31,7 +30,12 @@ * @version $Id$ */ public class FoiConfig extends AbstractConfig { - private final Parameter m_foiTermUrl = new StringParameter( + + /** + * Denotes the right category menu and path to use and + * to display in the Fois UI, + */ + private final Parameter m_foiTermUrl = new StringParameter( "com.arsdigita.cms.camden.contenttypes.foi_term_url", Parameter.OPTIONAL,"foi"); Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -18,40 +18,60 @@ */ package com.arsdigita.camden.cms.contenttypes; -import java.util.Calendar; -import java.util.Date; -import java.util.Timer; -import java.util.TimerTask; - import com.arsdigita.cms.contenttypes.ContentTypeInitializer; -import com.arsdigita.kernel.Kernel; -import com.arsdigita.kernel.KernelExcursion; -import com.arsdigita.runtime.LegacyInitEvent; -import com.arsdigita.search.MetadataProviderRegistry; /** - * Runtime initialization for the FOIs content type. + * Runtime initialization for the FOIs content type, executes at each + * system startup. + * + * Just uses the super class methods. + * + * This is done by runtimeRuntime startup method which runs the init() methods + * of all initializers (this one just using the parent implementation). * * @author Rahul Shukla * @version $Id: FoiInitializer.java 24 2006-11-02 14:14:14Z rahul shukla $ */ public class FoiInitializer extends ContentTypeInitializer { - public final static String versionId = "$Id: FoiInitializer.java 24 2005-08-02 14:14:14Z clasohm $"; - public void init(LegacyInitEvent evt) { - super.init(evt); - } - + /** + * Constructor, just sets the PDL manifest file and object type string. + */ public FoiInitializer() { - super("ccm-ldn-camden-foi.pdl.mf", Foi.BASE_DATA_OBJECT_TYPE); + super("ccm-lbc-foi.pdl.mf", Foi.BASE_DATA_OBJECT_TYPE); } +// REMOVED without replacement, does nothing at all +// Delete these lines after QA test done. +// public void init(LegacyInitEvent evt) { +// super.init(evt); +// } + + /** + * Retrieves fully qualified traversal adapter file name. + * @return + */ + @Override public String getTraversalXML() { return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Foi.xml"; } + /** + * Retrieve location of this content type's internal default theme + * stylesheet(s) which concomitantly serve as a fallback if a custom + * theme is engaged. + * + * Custom themes usually will provide their own stylesheet(s) and their own + * access method, but may not support every content type. + * + * Overwrites parent method with AgendaItem specific value for use by the + * parent class worker methods. + * + * @return String array of XSL stylesheet files of the internal default theme + */ + @Override public String[] getStylesheets() { - return new String[] { "/static/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xsl" }; + return new String[] { INTERNAL_THEME_TYPES_DIR + "Foi.xsl" }; } } Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -19,16 +19,10 @@ package com.arsdigita.camden.cms.contenttypes; import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader; -import com.arsdigita.domain.DomainObject; -import com.arsdigita.kernel.ACSObjectInstantiator; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.KernelExcursion; -import com.arsdigita.london.navigation.Template; -import com.arsdigita.persistence.DataObject; +import com.arsdigita.navigation.Template; import com.arsdigita.runtime.ScriptContext; -import com.arsdigita.web.Application; -import com.arsdigita.web.ApplicationSetup; -import com.arsdigita.web.ApplicationType; /** @@ -37,62 +31,46 @@ * @version $Id: FoiLoader.java 285 2006-11-05 00:29:02Z rahul shukla $ */ public class FoiLoader extends AbstractContentTypeLoader { - public final static String versionId = - "$Id: FoiLoader.java 285 2005-02-22 00:29:02Z rahul shukla $" + - "$Author: rahul Shukla $" + - "$DateTime: 2004/08/17 23:15:09 $"; + /** */ private static final String[] TYPES = { "/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml" }; - - public String[] getTypes() { - return TYPES; - } + /** + * + */ public void run(ScriptContext ctx) { + + // execute super script to create type super.run(ctx); new KernelExcursion() { protected void excurse() { setEffectiveParty(Kernel.getSystemParty()); + // register JSP as index page with navigation setupTemplate(); - setupApplication(); } }.run(); } + + /** + * + * @return + */ + public String[] getTypes() { + return TYPES; + } + /** + * Register a JSP to use as index page in navigation for a + * FOI content item. + */ private void setupTemplate() { Template.create("Foi's Index", "Index page for Foi's content items", - "/packages/foi/templates/foi-index.jsp"); + "/templates/ccm-lbc-foi/navigation/foi-indexpage.jsp"); } - - private void setupApplication() { - ApplicationSetup setup = new ApplicationSetup(s_log); - - setup.setApplicationObjectType( - FoiApp.BASE_DATA_OBJECT_TYPE); - setup.setKey("foi"); - setup.setTitle("Foi"); - setup.setDescription("Foi"); - setup.setSingleton(true); - setup.setInstantiator(new ACSObjectInstantiator() { - public DomainObject doNewInstance(DataObject dataObject) { - return new FoiApp(dataObject); - } - }); - ApplicationType type = setup.run(); - type.save(); - - FoiApp app = (FoiApp) - Application.createApplication(type, - "foi", - "Foi", - null); - app.save(); - } - } Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiUtil.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiUtil.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiUtil.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -18,6 +18,19 @@ */ package com.arsdigita.camden.cms.contenttypes; +import com.arsdigita.bebop.Label; +import com.arsdigita.bebop.PageState; +import com.arsdigita.bebop.form.Option; +import com.arsdigita.bebop.form.OptionGroup; +// import com.arsdigita.categorization.Category; +// import com.arsdigita.categorization.CategoryCollection; +import com.arsdigita.globalization.GlobalizedMessage; +import com.arsdigita.kernel.Kernel; +// import com.arsdigita.rssfeed.RSSFeed; +// import com.arsdigita.persistence.DataCollection; +// import com.arsdigita.persistence.SessionManager; +// import com.arsdigita.web.Application; + import java.math.BigDecimal; import java.util.Iterator; import java.util.Locale; @@ -27,18 +40,6 @@ import org.apache.log4j.Logger; -import com.arsdigita.bebop.Label; -import com.arsdigita.bebop.PageState; -import com.arsdigita.bebop.form.Option; -import com.arsdigita.bebop.form.OptionGroup; -import com.arsdigita.categorization.Category; -import com.arsdigita.categorization.CategoryCollection; -import com.arsdigita.globalization.GlobalizedMessage; -import com.arsdigita.kernel.Kernel; -import com.arsdigita.london.rss.RSS; -import com.arsdigita.persistence.DataCollection; -import com.arsdigita.persistence.SessionManager; -import com.arsdigita.web.Application; /** * Miscellaneous utility methods for the Foi content type. Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -18,15 +18,12 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; -import java.math.BigDecimal; -import java.util.Date; - import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.FormSectionEvent; -import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.categorization.Category; +// import com.arsdigita.camden.cms.contenttypes.FoiUtil; +// import com.arsdigita.categorization.Category; import com.arsdigita.cms.ContentBundle; import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentSection; @@ -36,19 +33,34 @@ import com.arsdigita.cms.ui.authoring.PageCreate; import com.arsdigita.util.Assert; +import java.math.BigDecimal; +import java.util.Date; + + +/** + * + * @author pb + */ public class FoiCreate extends PageCreate { private final CreationSelector m_parent; - public FoiCreate(final ItemSelectionModel itemModel, final CreationSelector parent) { + /** + * + * @param itemModel + * @param parent + */ + public FoiCreate(final ItemSelectionModel itemModel, + final CreationSelector parent) { + super(itemModel, parent); - m_parent = parent; } /** * This is copied from PageCreate.process(), */ + @Override public void process(final FormSectionEvent e) throws FormProcessException { final FormData data = e.getFormData(); final PageState state = e.getPageState(); Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -18,22 +18,22 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.arsdigita.camden.cms.contenttypes.Foi; -import com.arsdigita.globalization.GlobalizedMessage; -import com.arsdigita.kernel.ACSObject; -import com.arsdigita.london.navigation.DataCollectionRenderer; -import com.arsdigita.london.navigation.Navigation; -import com.arsdigita.london.navigation.ui.AbstractObjectList; +// import com.arsdigita.camden.cms.contenttypes.Foi; +// import com.arsdigita.globalization.GlobalizedMessage; +// import com.arsdigita.kernel.ACSObject; +// import com.arsdigita.navigation.DataCollectionRenderer; +import com.arsdigita.navigation.Navigation; +import com.arsdigita.navigation.ui.AbstractObjectList; import com.arsdigita.persistence.DataCollection; -import com.arsdigita.persistence.DataObject; +// import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.DataQuery; import com.arsdigita.persistence.DataQueryDataCollectionAdapter; import com.arsdigita.persistence.SessionManager; import com.arsdigita.xml.Element; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + /** * To be used as a component in a JSP page, this class displays the latest * Foi content items, sorted by descending publication date. @@ -57,20 +57,32 @@ getRenderer().setPageSize(m_maxCount); } + /** + * + * @param request + * @param response + * @return + */ + @Override protected DataCollection getObjects(HttpServletRequest request, - HttpServletResponse response) { + HttpServletResponse response) { + DataQuery query = SessionManager.getSession().retrieveQuery( "com.arsdigita.camden.cms.contenttypes.getLatestFoi"); - return new DataQueryDataCollectionAdapter(query, "foi") { + + return new DataQueryDataCollectionAdapter(query, "foi") { int i = 0; + @Override public void reset() { i = 0; super.reset(); } + @Override public void rewind() { i = 0; super.rewind(); } + @Override public boolean next() { boolean hasNext = super.next(); if (++i > m_maxCount) { @@ -82,6 +94,12 @@ }; } + /** + * + * @param request + * @param response + * @return + */ public Element generateXML(HttpServletRequest request, HttpServletResponse response) { Element content = Navigation.newElement("simpleObjectList"); Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -1,14 +1,32 @@ +/* + * Copyright (C) 2005 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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.camden.cms.contenttypes.ui; -import java.lang.reflect.Array; - -import com.arsdigita.camden.cms.contenttypes.FoiApp; import com.arsdigita.camden.cms.contenttypes.FoiUtil; +import com.arsdigita.camden.cms.foi.FoiApp; import com.arsdigita.categorization.Category; import com.arsdigita.categorization.CategoryCollection; import com.arsdigita.kernel.ACSObject; -import com.arsdigita.london.navigation.AbstractNavigationModel; +import com.arsdigita.navigation.AbstractNavigationModel; +import java.lang.reflect.Array; + /** * <p>NavigationModel to be used by the Camden Fois JSPs. * It provides the Fois category to the Path and Menu @@ -38,8 +56,9 @@ private FoiNavigationModel() { FoiApp app = FoiApp.retrieveApplication(); - if (app != null) + if (app != null) { m_rootCategory = Category.getRootForObject(app); + } if (m_rootCategory != null) { String foiTermUrl = @@ -63,8 +82,9 @@ } protected Category[] loadCategoryPath() { - if (m_tipCategory == null) + if (m_tipCategory == null) { return null; + } CategoryCollection ascendants = loadCategory().getDefaultAscendants(); @@ -83,8 +103,9 @@ } static public FoiNavigationModel retrieve() { - if (m_model == null) + if (m_model == null) { m_model = new FoiNavigationModel(); + } return m_model; } Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java 2012-12-30 09:47:56 UTC (rev 2447) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -16,13 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ + package com.arsdigita.camden.cms.contenttypes.ui; - -import java.math.BigDecimal; - -import org.apache.log4j.Logger; - import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.Link; @@ -36,13 +32,13 @@ import com.arsdigita.camden.cms.contenttypes.FoiUtil; import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.ContentPage; -import com.arsdigita.london.navigation.Navigation; +import com.arsdigita.navigation.Navigation; import com.arsdigita.persistence.DataQuery; import com.arsdigita.persistence.OID; import com.arsdigita.persistence.SessionManager; import com.arsdigita.toolbox.ui.DataQueryBuilder; import com.arsdigita.toolbox.ui.DataTable; -import com.arsdigita.toolbox.ui.DateTableCellRenderer; +// import com.arsdigita.toolbox.ui.DateTableCellRenderer; import com.arsdigita.toolbox.ui.QueryEvent; import com.arsdigita.toolbox.ui.QueryListener; import com.arsdigita.util.Assert; @@ -50,6 +46,11 @@ import com.arsdigita.web.URL; import com.arsdigita.web.Web; +import java.math.BigDecimal; + +import org.apache.log4j.Logger; + + /** * To be used as a component in a JSP page, this class displays all published * Foi items in a sortable and paginated table. @@ -201,6 +202,7 @@ /** * Register the ordering parameter */ + @Override public void register(Page p) { super.register(p); @@ -214,6 +216,7 @@ * @return the order by which the currently selected column will be sorted; * will be either ASCENDING or DESCENDING */ + @Override public String getOrderDirection(PageState s) { return (String) s.getValue(m_dirParam); } @@ -227,9 +230,10 @@ * the direction in which the current column should be sorted; * either ASCENDING or DESCENDING */ + @Override public void setOrderDirection(PageState s, String dir) { - Assert.truth(ASCENDING.equals(dir) || DESCENDING.equals(dir), - "invalid sort direction"); + Assert.isTrue(ASCENDING.equals(dir) || DESCENDING.equals(dir), + "invalid sort direction"); s.setValue(m_dirParam, dir); } @@ -241,7 +245,7 @@ * either ASCENDING or DESCENDING */ public void setDefaultOrderDirection(String dir) { - Assert.unlocked(this); + Assert.isUnlocked(this); m_dirParam.setDefaultValue(dir); } @@ -252,14 +256,19 @@ // to reset the paginator, because the number of // items will have changed. Paginator paginator = getPaginator(); - if (paginator != null) + if (paginator != null) { paginator.reset(state); + } } public String getFilter(PageState state) { return (String)state.getValue(m_filter); } + + /** + * + */ private class AvailableFormatCellRenderer implements TableCellRenderer { private Label l = new Label(); public Component getComponent(Table table, PageState state, @@ -269,6 +278,9 @@ } } + /** + * + */ private class ContactDetailTableCellRenderer implements TableCellRenderer { private Label l = new Label(); public Component getComponent(Table table, PageState state, @@ -277,10 +289,7 @@ return l; } } - - - - + } Copied: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/FoiApp.java (from rev 2439, contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiApp.java) =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/FoiApp.java (rev 0) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/FoiApp.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,44 @@ +package com.arsdigita.camden.cms.foi; + +import com.arsdigita.persistence.DataCollection; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.OID; +import com.arsdigita.persistence.SessionManager; +import com.arsdigita.web.Application; + + +/** + * This application contains the browsing and alerting UI + * for the Camden Foi's content type. The JSPs can + * be found in web/packages/fois/www. + * + * @author Rahul Shukla + * @version $Id: FoiApp.java 32 2006-10-28 16:06:03Z Rahul Shukla $ + */ +public class FoiApp extends Application { + + public static final String BASE_DATA_OBJECT_TYPE = + "com.arsdigita.camden.cms.foi.FoiApp"; + + public FoiApp(DataObject obj) { + super(obj); + } + + public FoiApp(OID oid) { + super(oid); + } + + static public FoiApp retrieveApplication() { + DataCollection apps = + SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE); + + if (!apps.next()) + return null; + + DataObject obj = apps.getDataObject(); + apps.close(); + + return new FoiApp(obj); + } + +} Added: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Initializer.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Initializer.java (rev 0) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Initializer.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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.camden.cms.foi; + +import com.arsdigita.db.DbHelper; +import com.arsdigita.domain.DomainObject; +import com.arsdigita.kernel.ACSObjectInstantiator; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.pdl.ManifestSource; +import com.arsdigita.persistence.pdl.NameFilter; +import com.arsdigita.runtime.CompoundInitializer; +import com.arsdigita.runtime.DomainInitEvent; +import com.arsdigita.runtime.PDLInitializer; +import com.arsdigita.runtime.RuntimeConfig; +import org.apache.log4j.Logger; + +/** + * Runtime initialization for the FOIs application, executes recurringly + * at each system startup. + * + * Just uses the super class methods. + * + * This is done by runtimeRuntime startup method which runs the init() methods + * of all initializers (this one just using the parent implementation). + * + * + * @author pb + * @version $Id: Initializer.java 2289 2012-12-29 09:45:10Z pboy $ + */ +public class Initializer extends CompoundInitializer { + + /** Creates a s_logging category with name = to the full name of class */ + private static Logger s_log = Logger.getLogger(Initializer.class); + + + + /** + * Constructor, just sets the PDL manifest file and object type string. + */ + public Initializer() { + final String url = RuntimeConfig.getConfig().getJDBCURL(); + final int database = DbHelper.getDatabaseFromURL(url); + + add(new PDLInitializer + (new ManifestSource + ("ccm-lbc-foi.pdl.mf", + new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl")))); + } + + + /** + * Initializes domain-coupling machinery, usually consisting of + * registering object instantiators and observers. + */ + @Override + public void init(DomainInitEvent evt) { + s_log.debug("foi.Initializer.init(DomainInitEvent) invoked"); + // super.init(evt); +/* Formerly part of class ApplicationSetup + setup.setInstantiator(new ACSObjectInstantiator() { + public DomainObject doNewInstance(DataObject dataObject) { + return new FoiApp(dataObject); + } +*/ + // Register the FOI Instaniator + // Replaces instatiator formerly provided by class ApplicationSetup in Loader + evt.getFactory().registerInstantiator(FoiApp.BASE_DATA_OBJECT_TYPE, + new ACSObjectInstantiator() { + @Override + public DomainObject doNewInstance(DataObject dataObject) { + return new FoiApp(dataObject); + } + }); + s_log.debug("foi.Initializer.init(DomainInitEvent) completed"); + } // END init(DomainInitEvent e) + +} Added: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Loader.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Loader.java (rev 0) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Loader.java 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2012-2013 University of Bremen. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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.camden.cms.foi; + +import com.arsdigita.kernel.Kernel; +import com.arsdigita.kernel.KernelExcursion; +import com.arsdigita.loader.PackageLoader; +import com.arsdigita.runtime.ScriptContext; +import com.arsdigita.web.Application; +import com.arsdigita.web.ApplicationType; +import org.apache.log4j.Logger; + +/** + * + * @author pb + */ +public class Loader extends PackageLoader { + + private static final Logger s_log = Logger.getLogger(Loader.class); + + public void run(final ScriptContext ctx) { + new KernelExcursion() { + public void excurse() { + setEffectiveParty(Kernel.getSystemParty()); + + setupFoiApp(); + } + }.run(); + } + + + /** + * Creates FOI application as a legacy-free application type. + * + * NOTE: The wording in the title parameter of ApplicationType determines + * the name of the subdirectory for the XSL stylesheets. + * It gets "urlized", i.e. trimming leading and trailing blanks and replacing + * blanks between words and illegal characters with an hyphen and converted + * to lower case. + * Example: "Theme Director" will become "theme-director". + * + * Creates an entry in table application_types + */ + private void setupFoiApp() { +/* + * ApplicationSetup setup = new ApplicationSetup(s_log); + + setup.setApplicationObjectType( + FoiApp.BASE_DATA_OBJECT_TYPE); + setup.setKey("foi"); + setup.setTitle("Foi"); + setup.setDescription("Foi"); + setup.setSingleton(true); + setup.setInstantiator(new ACSObjectInstantiator() { + public DomainObject doNewInstance(DataObject dataObject) { + return new FoiApp(dataObject); + } + }); + ApplicationType type = setup.run(); + type.save(); +*/ + + ApplicationType type = + new ApplicationType( "FOI", + FoiApp.BASE_DATA_OBJECT_TYPE ); + type.setDescription("Foi"); + // type.setSingleton(true); Currently deprecated and for compat. type only + + // create application instance as a legacy free app. + // Whether a legacy compatible or a legacy free application is + // created depends on the type of ApplicationType above. No need to + // modify anything here + Application app = + Application.createApplication(type, + "foi", + "Foi", + null); + + app.setDescription("FOI application instance"); + app.save(); + } + +} Added: contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/deleted.jsp =================================================================== --- contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/deleted.jsp (rev 0) +++ contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/deleted.jsp 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,36 @@ +<jsp:root + xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:define="/WEB-INF/bebop-define.tld" + xmlns:show="/WEB-INF/bebop-show.tld" + version="1.2"> + + <jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/> + <jsp:directive.page import="com.arsdigita.camden.cms.contenttypes.ui.ConsultationsNavigationModel" /> + <jsp:directive.page import="com.arsdigita.camden.cms.contenttypes.ui.admin.BulkDeletionConfirm" /> + <jsp:directive.page import="com.arsdigita.london.navigation.Navigation"/> + <jsp:directive.page import="com.arsdigita.london.navigation.NavigationModel"/> + + <jsp:scriptlet> + DispatcherHelper.cacheDisable(response); + </jsp:scriptlet> + + <define:page name="alertConfirmPage" application="navigation" title="Confirm Consultation Alert" cache="false"> + <define:component name="greetingItem" + classname="com.arsdigita.london.navigation.ui.GreetingItem"/> + <define:component name="categoryPath" + classname="com.arsdigita.london.navigation.ui.category.Path"/> + <define:component name="categoryMenu" + classname="com.arsdigita.london.navigation.ui.category.Menu"/> + <define:component name="alertConfirm" + classname="com.arsdigita.camden.cms.contenttypes.ui.admin.BulkDeletionConfirm"/> + + <jsp:scriptlet> + NavigationModel navModel = ConsultationsNavigationModel.retrieve(); + ((com.arsdigita.london.navigation.ui.GreetingItem)greetingItem).setModel(navModel); + ((com.arsdigita.london.navigation.ui.category.Path)categoryPath).setModel(navModel); + ((com.arsdigita.london.navigation.ui.category.Menu)categoryMenu).setModel(navModel); + </jsp:scriptlet> + </define:page> + + <show:all/> +</jsp:root> Added: contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/index.jsp =================================================================== --- contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/index.jsp (rev 0) +++ contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/index.jsp 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,44 @@ +<jsp:root + xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:define="/WEB-INF/bebop-define.tld" + xmlns:show="/WEB-INF/bebop-show.tld" + version="1.2"> + + <jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/> + <jsp:directive.page import="com.arsdigita.toolbox.ui.ApplicationAuthenticationListener"/> + <jsp:directive.page import="com.arsdigita.camden.cms.contenttypes.ui.ConsultationsNavigationModel" /> + <jsp:directive.page import="com.arsdigita.camden.cms.contenttypes.ui.admin.BulkDeletionForm" /> + <jsp:directive.page import="com.arsdigita.navigation.Navigation"/> + <jsp:directive.page import="com.arsdigita.navigation.NavigationModel"/> + + <jsp:scriptlet> + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + </jsp:scriptlet> + + <define:page name="bulkDeletionPage" application="navigation" title="Bulk Delete Email Alerts" cache="false"> + <define:component name="greetingItem" + classname="com.arsdigita.navigation.ui.GreetingItem"/> + <define:component name="categoryPath" + classname="com.arsdigita.navigation.ui.category.Path"/> + <define:component name="categoryMenu" + classname="com.arsdigita.navigation.ui.category.Menu"/> + <define:component name="alertConfirm" + classname="com.arsdigita.camden.cms.contenttypes.ui.admin.BulkDeletionForm"/> + + <jsp:scriptlet> + bulkDeletionPage.addRequestListener(new ApplicationAuthenticationListener()); + + NavigationModel navModel = ConsultationsNavigationModel.retrieve(); + ((com.arsdigita.navigation.ui.GreetingItem)greetingItem).setModel(navModel); + ((com.arsdigita.navigation.ui.category.Path)categoryPath).setModel(navModel); + ((com.arsdigita.navigation.ui.category.Menu)categoryMenu).setModel(navModel); + </jsp:scriptlet> + </define:page> + + <show:all/> +</jsp:root> Added: contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/index.jsp =================================================================== --- contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/index.jsp (rev 0) +++ contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/index.jsp 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,60 @@ +<jsp:root + xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:define="/WEB-INF/bebop-define.tld" + xmlns:show="/WEB-INF/bebop-show.tld" + version="1.2"> + + <jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/> + <jsp:directive.page import="com.arsdigita.bebop.Paginator"/> + <jsp:directive.page import="com.arsdigita.camden.cms.contenttypes.ui.FoiList" /> + <jsp:directive.page import="com.arsdigita.camden.cms.contenttypes.ui.FoiFilter" /> + <jsp:directive.page import="com.arsdigita.camden.cms.contenttypes.ui.FoiTable" /> + <jsp:directive.page import="com.arsdigita.camden.cms.contenttypes.ui.FoiNavigationModel" /> + <jsp:directive.page import="com.arsdigita.navigation.Navigation"/> + <jsp:directive.page import="com.arsdigita.navigation.NavigationModel"/> + + <jsp:scriptlet> + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + </jsp:scriptlet> + + <define:page name="foiIndexPage" application="navigation" title="Foi" cache="true"> + <define:component name="greetingItem" + classname="com.arsdigita.navigation.ui.GreetingItem"/> + <define:component name="categoryPath" + classname="com.arsdigita.navigation.ui.category.Path"/> + <define:component name="categoryMenu" + classname="com.arsdigita.navigation.ui.category.Menu"/> + <define:component name="latestFoi" + classname="com.arsdigita.camden.cms.contenttypes.ui.FoiList"/> + <define:component name="foiFilter" + classname="com.arsdigita.camden.cms.contenttypes.ui.FoiFilter"/> + <define:component name="foiTable" + classname="com.arsdigita.camden.cms.contenttypes.ui.FoiTable"/> + + <jsp:scriptlet> + NavigationModel navModel = FoiNavigationModel.retrieve(); + ((com.arsdigita.navigation.ui.GreetingItem)greetingItem).setModel(navModel); + ((com.arsdigita.navigation.ui.category.Path)categoryPath).setModel(navModel); + ((com.arsdigita.navigation.ui.category.Menu)categoryMenu).setModel(navModel); + + FoiList list = (FoiList)latestFoi; + list.setMaxCount(5); + + FoiTable table = (FoiTable)foiTable; + Paginator paginator = new Paginator(table, 10); + table.setPaginator(paginator); + foiIndexPage.add(paginator); + + FoiFilter filter = (FoiFilter)foiFilter; + filter.addWidgets(table); + </jsp:scriptlet> + + </define:page> + + <show:all/> +</jsp:root> Added: contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/navigation/foi-indexpage.jsp =================================================================== --- contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/navigation/foi-indexpage.jsp (rev 0) +++ contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/navigation/foi-indexpage.jsp 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,12 @@ +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"> + + <jsp:directive.page import="com.arsdigita.web.URL"/> + <jsp:directive.page import="com.arsdigita.web.RedirectSignal"/> + <jsp:directive.page import="com.arsdigita.camden.cms.contenttypes.FoiApp"/> + <jsp:directive.page extends="com.arsdigita.web.BaseJSP"/> + + <jsp:scriptlet> + FoiApp app = FoiApp.retrieveApplication(); + throw new RedirectSignal(URL.there(request, app, null), false); + </jsp:scriptlet> +</jsp:root> Copied: contrib/camden/ccm-lbc-foi/web/themes/heirloom/contenttypes/Foi.xsl (from rev 2439, contrib/camden/ccm-lbc-foi/web/static/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xsl) =================================================================== --- contrib/camden/ccm-lbc-foi/web/themes/heirloom/contenttypes/Foi.xsl (rev 0) +++ contrib/camden/ccm-lbc-foi/web/themes/heirloom/contenttypes/Foi.xsl 2012-12-30 09:52:52 UTC (rev 2448) @@ -0,0 +1,79 @@ +<!DOCTYPE stylesheet [ +<!ENTITY nbsp " " ><!-- no-break space = non-breaking space, U+00A0 ISOnum --> +]> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:cms="http://www.arsdigita.com/cms/1.0" + xmlns:bebop="http://www.arsdigita.com/bebop/1.0" + version="1.0"> + + <xsl:template match="cms:item[objectType='com.arsdigita.camden.cms.contenttypes.Foi']" mode="cms:CT_graphics" + name="cms:CT_graphics_com_arsdigita_camden_cms_contenttypes_Foi"> + <table> + <thead><tr><th colspan="2"><strong>Details Of Selected publication Scheme</strong></th></tr></thead> + <tbody> + <tr> + <th>Description</th> + <td><xsl:value-of disable-output-escaping="yes" select="./description"/> + </td> + </tr> + <tr> + <th>Availablity</th> + <td><xsl:value-of disable-output-escaping="yes" select="./availableFormat"/> + </td> + </tr> + <tr> + <xsl:choose> + <xsl:when test="./links/targetType"> + <th>Link</th> + <td valign="top"> + <xsl:element name="a"> + <xsl:attribute name="href"> + <xsl:value-of select="//targetURI" /> + </xsl:attribute> + <xsl:value-of select="//targetURI" /> + </xsl:element> + </td> + </xsl:when> + <xsl:otherwise> + <th>Download</th> + <td> + <xsl:element name="a"> + <xsl:attribute name="href">/ccm/cms-service/stream/asset/?asset_id=<xsl:value-of disable-output-escaping="yes" select="./fileAttachments/id" /> + </xsl:attribute> + <xsl:value-of disable-output-escaping="yes" select="./fileAttachments/name"/> + + </xsl:element> + </td> + </xsl:otherwise> + </xsl:choose> + </tr> + <tr> + <th>Contact</th> + <td><xsl:value-of disable-output-escaping="yes" select="./contactDetail"/></td> + </tr> + + </tbody> + </table> + <table> + <thead><tr><th colspan="2"><strong>Publication Scheme Class</strong></th></tr></thead> + + <tbody><tr><td><strong>Category of Relevance</strong><br/>The information resides within the following categories which may contain other information which is relevant to you.</td></tr> + + <tr> + <td>PSCL/Class > <a href="/ccm/foi"><xsl:value-of disable-output-escaping="yes" select="./categoryFoi" /></a></td> + </tr> + + </tbody> + </table> + + + + </xsl:template> + + <xsl:template match="cms:item[objectType='com.arsdigita.camden.cms.contenttypes.Foi']" mode="cms:CT_text" + name="cms:CT_text_com_arsdigita_camden_cms_contenttypes_Foi"> + <h1 class="mainTitle">Freedom Of Information <xsl:text disable-output-escaping="yes">&</xsl:text>gt; <xsl:value-of select="./title"/>TESTING THE HEADING</h1> + </xsl:template> + +</xsl:stylesheet> |
From: <pb...@fe...> - 2012-12-30 09:48:06
|
Author: pboy Date: 2012-12-30 09:47:56 +0000 (Sun, 30 Dec 2012) New Revision: 2447 Added: contrib/camden/ccm-lbc-eforms/sql/ccm-lbc-eforms/ contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.config contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.load contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.upgrade Removed: contrib/camden/ccm-lbc-eforms/sql/ccm-ldn-camden-eforms/ contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.config contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.load contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.upgrade Modified: contrib/camden/ccm-lbc-eforms/application.xml contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EForm.java contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormInitializer.java contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormLoader.java contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertiesStep.java contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertyForm.java Log: First part of update to version 2.0. Not tested yet. Modified: contrib/camden/ccm-lbc-eforms/application.xml =================================================================== --- contrib/camden/ccm-lbc-eforms/application.xml 2012-12-30 09:46:08 UTC (rev 2446) +++ contrib/camden/ccm-lbc-eforms/application.xml 2012-12-30 09:47:56 UTC (rev 2447) @@ -1,8 +1,8 @@ <?xml version="1.0"?> <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" - name="ccm-ldn-camden-eforms" + name="ccm-lbc-eforms" prettyName="Camden eForms Content Type" - version="1.0.1" + version="6.6.0" release="1" webapp="ROOT"> <ccm:dependencies> Copied: contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.config (from rev 2439, contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.config) =================================================================== --- contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.config (rev 0) +++ contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.config 2012-12-30 09:47:56 UTC (rev 2447) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<registry> + <!-- nothing yet --> +</registry> Copied: contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.load (from rev 2439, contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.load) =================================================================== --- contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.load (rev 0) +++ contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.load 2012-12-30 09:47:56 UTC (rev 2447) @@ -0,0 +1,16 @@ +<load> + <requires> + <table name="inits"/> + <table name="acs_objects"/> + <table name="cms_items"/> + <initializer class="com.arsdigita.cms.Initializer"/> + </requires> + <provides> + <table name="ct_eform"/> + <initializer class="com.arsdigita.camden.cms.contenttypes.EFormInitializer"/> + </provides> + <scripts> + <schema directory="ccm-lbc-eforms"/> + <data class="com.arsdigita.camden.cms.contenttypes.EFormLoader"/> + </scripts> +</load> Copied: contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.upgrade (from rev 2439, contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.upgrade) =================================================================== --- contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.upgrade (rev 0) +++ contrib/camden/ccm-lbc-eforms/src/ccm-lbc-eforms.upgrade 2012-12-30 09:47:56 UTC (rev 2447) @@ -0,0 +1,5 @@ +<upgrade> + <version from="1.0.0" to="1.0.1"> + <script sql="ccm-lbc-eforms/upgrade/::database::-1.0.0-1.0.1.sql"/> + </version> +</upgrade> Deleted: contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.config =================================================================== --- contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.config 2012-12-30 09:46:08 UTC (rev 2446) +++ contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.config 2012-12-30 09:47:56 UTC (rev 2447) @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<registry> - <!-- nothing yet --> -</registry> Deleted: contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.load =================================================================== --- contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.load 2012-12-30 09:46:08 UTC (rev 2446) +++ contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.load 2012-12-30 09:47:56 UTC (rev 2447) @@ -1,16 +0,0 @@ -<load> - <requires> - <table name="inits"/> - <table name="acs_objects"/> - <table name="cms_items"/> - <initializer class="com.arsdigita.cms.Initializer"/> - </requires> - <provides> - <table name="ct_eform"/> - <initializer class="com.arsdigita.camden.cms.contenttypes.EFormInitializer"/> - </provides> - <scripts> - <schema directory="ccm-ldn-camden-eforms"/> - <data class="com.arsdigita.camden.cms.contenttypes.EFormLoader"/> - </scripts> -</load> Deleted: contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.upgrade =================================================================== --- contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.upgrade 2012-12-30 09:46:08 UTC (rev 2446) +++ contrib/camden/ccm-lbc-eforms/src/ccm-ldn-camden-eforms.upgrade 2012-12-30 09:47:56 UTC (rev 2447) @@ -1,5 +0,0 @@ -<upgrade> - <version from="1.0.0" to="1.0.1"> - <script sql="ccm-ldn-camden-eforms/upgrade/::database::-1.0.0-1.0.1.sql"/> - </version> -</upgrade> Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EForm.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EForm.java 2012-12-30 09:46:08 UTC (rev 2446) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EForm.java 2012-12-30 09:47:56 UTC (rev 2447) @@ -31,10 +31,11 @@ /** * This content type represents an e-Form. * + * @version $Id$ */ public class EForm extends ContentPage { - public final static String versionId = "$Id$"; + /** Private Logger instance for debugging purpose. */ private static final Logger s_log = Logger.getLogger(EForm.class); /** PDL property name for definition */ @@ -48,6 +49,10 @@ public static final String TYPE = BASE_DATA_OBJECT_TYPE; + /** + * Default Constructor. + * TODO: Add cocumentation! + */ public EForm() { this( BASE_DATA_OBJECT_TYPE ); try { @@ -80,18 +85,36 @@ } + /** + * TODO: Add documentation! + * @return + */ public String getURL() { return (String) get(URL); } + /** + * TODO: Add documentation! + * @return + */ public void setURL( String url ) { set(URL, url); } + /** + * TODO: Add documentation! + * @return + */ + @Override public String getDescription() { return (String) get(DESCRIPTION); } + /** + * TODO: Add documentation! + * @return + */ + @Override public void setDescription( String description ) { set(DESCRIPTION, description); } Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormInitializer.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormInitializer.java 2012-12-30 09:46:08 UTC (rev 2446) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormInitializer.java 2012-12-30 09:47:56 UTC (rev 2447) @@ -22,20 +22,27 @@ import org.apache.log4j.Logger; /** - * The eForm content type initializer. + * Runtime initialization for the eForm content type, executes at each + * system startup. + * + * Just uses the super class methods. + * + * This is done by runtimeRuntime startup method which runs the init() methods + * of all initializers (this one just using the parent implementation). * * @author Alan Pevec + * @version $Id$ */ public class EFormInitializer extends ContentTypeInitializer { - public final static String versionId = - "$Id$" + - "$Author$" + - "$DateTime$"; + /** Private Logger instance for debugging purpose. */ private static final Logger s_log = Logger.getLogger(EFormInitializer.class); + /** + * Constructor, just sets the PDL manifest file and object type string. + */ public EFormInitializer() { - super("ccm-ldn-camden-eforms.pdl.mf", + super("ccm-lbc-eforms.pdl.mf", EForm.BASE_DATA_OBJECT_TYPE); } Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormLoader.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormLoader.java 2012-12-30 09:46:08 UTC (rev 2446) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/EFormLoader.java 2012-12-30 09:47:56 UTC (rev 2447) @@ -18,33 +18,50 @@ */ package com.arsdigita.camden.cms.contenttypes; +import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.ContentType; import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader; -import com.arsdigita.cms.ContentType; -import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.lifecycle.LifecycleDefinition; -import com.arsdigita.workflow.simple.WorkflowTemplate; import com.arsdigita.util.UncheckedWrapperException; -import java.net.URL; -import java.net.MalformedURLException; import com.arsdigita.util.parameter.Parameter; +import com.arsdigita.util.parameter.ResourceParameter; import com.arsdigita.util.parameter.URLParameter; +import com.arsdigita.workflow.simple.WorkflowTemplate; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; /** - * e-Form content type loader + * Loads the database after the e-Form content type data model has been + * created. * + * Executes nonrecurring at install time and loads (installs and initializes) + * the ccm-lbc-eforms package persistently into database. + * * @author Alan Pevec + * @version $Id$ */ public class EFormLoader extends AbstractContentTypeLoader { - public final static String versionId = "$Id$"; private static final String[] TYPES = { "/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/EForm.xml" }; - private URLParameter m_template; + // URL resource parameter removed! + // private URLParameter m_template; + /** Create parameter for... */ + private final Parameter m_template = new ResourceParameter( + "com.arsdigita.camden.cms.contenttypes.eform.defaulttemplate", + Parameter.REQUIRED, + "/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/eform-item.jsp" + ); + /** + * Constructor + */ public EFormLoader() { +/* URL resource protocol removed. See cms.CMSConfig for details. try { m_template = new URLParameter ("com.arsdigita.camden.cms.contenttypes.eform.defaulttemplate", @@ -55,6 +72,7 @@ } catch (MalformedURLException ex) { throw new UncheckedWrapperException("cannot parse url", ex); } +*/ register(m_template); } @@ -63,15 +81,24 @@ return TYPES; } + /** + * + * @param section + * @param type + * @param ld + * @param wf + */ + @Override protected void prepareSection(final ContentSection section, - final ContentType type, - final LifecycleDefinition ld, - final WorkflowTemplate wf) { + final ContentType type, + final LifecycleDefinition ld, + final WorkflowTemplate wf) { super.prepareSection(section, type, ld, wf); setDefaultTemplate("EFormDefaultTemplate", "eform-item", - (URL)get(m_template), + // (URL)get(m_template), + (InputStream) get(m_template), section, type,ld, wf); } Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertiesStep.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertiesStep.java 2012-12-30 09:46:08 UTC (rev 2446) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertiesStep.java 2012-12-30 09:47:56 UTC (rev 2447) @@ -18,15 +18,14 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.camden.cms.contenttypes.EForm; - -import com.arsdigita.bebop.Component; -import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; +import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; +import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; -import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; /** @@ -60,6 +59,9 @@ * @pre itemModel != null * @return A component to display the state of the basic properties * of the release + * + * Method add deprecated, use add(GlobalizedMessage label, String attribute) + * instead (but probably Camden doesn't use globalized strings). */ public static Component getEFormPropertySheet( ItemSelectionModel itemModel ) { Modified: contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertyForm.java =================================================================== --- contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertyForm.java 2012-12-30 09:46:08 UTC (rev 2446) +++ contrib/camden/ccm-lbc-eforms/src/com/arsdigita/camden/cms/contenttypes/ui/EFormPropertyForm.java 2012-12-30 09:47:56 UTC (rev 2447) @@ -18,7 +18,6 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; -import com.arsdigita.camden.cms.contenttypes.EForm; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.FormInitListener; @@ -26,9 +25,7 @@ import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.form.TextArea; import com.arsdigita.bebop.form.TextField; -import com.arsdigita.bebop.parameters.ParameterModel; -import com.arsdigita.bebop.parameters.ParameterModel; -import com.arsdigita.bebop.parameters.StringParameter; +import com.arsdigita.camden.cms.contenttypes.EForm; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.BasicPageForm; @@ -56,6 +53,7 @@ /** * Adds widgets to the form. */ + @Override protected void addWidgets() { super.addWidgets(); |
From: <pb...@fe...> - 2012-12-30 09:46:20
|
Author: pboy Date: 2012-12-30 09:46:08 +0000 (Sun, 30 Dec 2012) New Revision: 2446 Modified: contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/Config.java contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/ContentCheckAlert.java contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/Initializer.java Log: First part of update to version 2.0. Does not compile yet. Modified: contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/Config.java =================================================================== --- contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/Config.java 2012-12-30 09:44:23 UTC (rev 2445) +++ contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/Config.java 2012-12-30 09:46:08 UTC (rev 2446) @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2005 Red Hat Inc. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * 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.london.cms.check; import com.arsdigita.runtime.AbstractConfig; @@ -4,45 +23,85 @@ import com.arsdigita.util.parameter.IntegerParameter; import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.StringArrayParameter; - import com.arsdigita.util.parameter.StringParameter; +import org.apache.log4j.Logger; + +/** + * A record containing server-session scoped configuration properties. + * + * Accessors of this class may return null. Developers should take care to trap + * null return values in their code. + * + * @version $Id: Config.java 2070 2012-12-28 08:47:41Z pboy $ + */ public class Config extends AbstractConfig { - private final Parameter m_contentCheckTypes; + /** Private Logger instance for debugging purpose. */ + private static final Logger s_log = Logger.getLogger(Config.class); - private final Parameter m_contentCheckInterval; + /** Private Object to hold one's own instance to return to users. */ + private static Config s_config; - private final Parameter m_contentCheckLimit; + /** + * Returns the singleton configuration config record. + * + * Use always this method to rtrieve a configuration object, never + * instantiate using the constructor (singelton pattern)! + * + * @return The <code>Config</code> record; it cannot be null + */ + public static synchronized Config getInstance() { + if (s_config == null) { + s_config = new Config(); + s_config.load(); + } + return s_config; + } - private final Parameter m_contentCheckFrom; + // /////////////////////////////////////////////////////////////////////// + // Config Parameter Section + // /////////////////////////////////////////////////////////////////////// + + private final Parameter m_contentCheckTypes = new StringArrayParameter( + "com.arsdigita.cms.check_types", Parameter.OPTIONAL, + new String[] { + "com.arsdigita.cms.contenttypes.Article", + "com.arsdigita.cms.contenttypes.MultiPartArticle" } + ); - private final Parameter m_contentCheckBcc; + private final Parameter m_contentCheckInterval = new IntegerParameter( + "com.arsdigita.cms.check_interval", Parameter.REQUIRED, + new Integer(17 * 7) // in days, 17 weeks is default + ); - private final Parameter m_contentCheckHour; - - public Config() { - super(); - m_contentCheckTypes = new StringArrayParameter( - "com.arsdigita.cms.check_types", Parameter.OPTIONAL, - new String[] { "com.arsdigita.cms.contenttypes.Article", - "com.arsdigita.cms.contenttypes.MultiPartArticle" }); - m_contentCheckInterval = new IntegerParameter( - "com.arsdigita.cms.check_interval", Parameter.REQUIRED, - new Integer(17 * 7) // in days, 17 weeks is default - ); - m_contentCheckLimit = new IntegerParameter( + private final Parameter m_contentCheckLimit = new IntegerParameter( "com.arsdigita.cms.check_limit", Parameter.REQUIRED, new Integer(0)); - m_contentCheckFrom = new StringParameter( - "com.arsdigita.cms.check_sender", Parameter.OPTIONAL,null - ); - m_contentCheckBcc = new StringParameter( - "com.arsdigita.cms.check_bcc", Parameter.OPTIONAL,null - ); - m_contentCheckHour = new IntegerParameter( + + private final Parameter m_contentCheckFrom = new StringParameter( + "com.arsdigita.cms.check_sender", Parameter.OPTIONAL, null ); + + private final Parameter m_contentCheckBcc = new StringParameter( + "com.arsdigita.cms.check_bcc", Parameter.OPTIONAL, null ); + + private final Parameter m_contentCheckHour = new IntegerParameter( "com.arsdigita.cms.check_hour", Parameter.REQUIRED, new Integer(5)); + + // /////////////////////////////////////////////////////////////////////// + // Config Parameter Section END + // /////////////////////////////////////////////////////////////////////// + + /** + * Constructor, but do NOT instantiate this class directly. + * + * Just registers the configuration parameters. + */ + public Config() { + // Remove testwise. does nothing at all (empty). + // super(); + register(m_contentCheckTypes); register(m_contentCheckInterval); register(m_contentCheckLimit); @@ -50,8 +109,15 @@ register(m_contentCheckBcc); register(m_contentCheckHour); + loadInfo(); + } + + // /////////////////////////////////////////////////////////////////////// + // Retrieve Parameter Section + // /////////////////////////////////////////////////////////////////////// + public final String[] getContentCheckTypes() { return (String[]) get(m_contentCheckTypes); } Modified: contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/ContentCheckAlert.java =================================================================== --- contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/ContentCheckAlert.java 2012-12-30 09:44:23 UTC (rev 2445) +++ contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/ContentCheckAlert.java 2012-12-30 09:46:08 UTC (rev 2446) @@ -18,46 +18,39 @@ */ package com.arsdigita.london.cms.check; -import java.math.BigDecimal; -import java.net.URLEncoder; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.Map; -import java.util.Random; -import java.util.TimerTask; - -import org.apache.log4j.Logger; - -import com.arsdigita.cms.ContentItem; -import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentType; import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.cms.workflow.CMSTask; import com.arsdigita.domain.DataObjectNotFoundException; -import com.arsdigita.kernel.Kernel; -import com.arsdigita.kernel.Party; import com.arsdigita.mail.Mail; -import com.arsdigita.messaging.Message; -import com.arsdigita.messaging.MessagingException; -import com.arsdigita.notification.Notification; import com.arsdigita.persistence.DataOperation; import com.arsdigita.persistence.DataQuery; -import com.arsdigita.persistence.Session; import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.TransactionContext; import com.arsdigita.util.StringUtils; -import com.arsdigita.util.servlet.HttpHost; import com.arsdigita.web.URL; -import com.arsdigita.web.Web; -import com.arsdigita.web.WebConfig; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.util.Collection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.Map; +import java.util.Random; +import java.util.TimerTask; +import org.apache.log4j.Logger; /** * A TimerTask which will send alerts when items become outdated. * Configured by registry parameters: - * com.arsdigita.cms.check_types, com.arsdigita.cms.check_interval and com.arsdigita.cms.check_limit. - * and optional arsdigita.cms.check_sender arsdigita.cms.check_bcc + * com.arsdigita.cms.check_types, + * com.arsdigita.cms.check_interval + * and + * com.arsdigita.cms.check_limit. + * + * and optional + * arsdigita.cms.check_sender + * arsdigita.cms.check_bcc */ public class ContentCheckAlert extends TimerTask { @@ -72,7 +65,19 @@ private String checkBcc; private String serverURL; - public ContentCheckAlert(String[] checkTypes, Integer interval, Integer limit, String checkFrom, String checkBcc) { + /** + * + * @param checkTypes + * @param interval + * @param limit + * @param checkFrom + * @param checkBcc + */ + public ContentCheckAlert(String[] checkTypes, + Integer interval, + Integer limit, + String checkFrom, + String checkBcc) { super(); this.checkTypes = checkTypes; this.interval = interval; @@ -82,7 +87,11 @@ this.serverURL = URL.root().getURL(); } + /** + * + */ public void run() { + Thread.currentThread().setName("content-check"); s_log.warn("Content Check start"); TransactionContext txn = null; @@ -102,7 +111,8 @@ } } if ( !checkTypeIDs.isEmpty() ) { - outdated = SessionManager.getSession().retrieveQuery("com.arsdigita.london.cms.check.getOutdatedContent"); + outdated = SessionManager.getSession() + .retrieveQuery("com.arsdigita.london.cms.check.getOutdatedContent"); checkContent(outdated); } txn.commitTxn(); @@ -123,6 +133,10 @@ } } + /** + * + * @param outdated + */ private void checkContent(DataQuery outdated) { //Set query parameters @@ -151,7 +165,8 @@ final String objectType = (String) outdated.get("objectType"); final String contact = (String) outdated.get("creatorContact"); final String itemHash = (String) outdated.get("alertMsgHash"); - s_log.debug("Retrieved outdated item (itemID,objectType,contact,itemHash): " + itemID+ objectType+ contact+ itemHash); + s_log.debug("Retrieved outdated item (itemID,objectType,contact,itemHash): " + + itemID + objectType + contact + itemHash); LinkedList alertItems = (LinkedList) creatorItemsMap.get(contact); if(alertItems == null) { @@ -191,6 +206,13 @@ s_log.warn("check performed for "+totalItems+" item(s)"); } + /** + * + * @param from + * @param to + * @param alertItems + * @return + */ private boolean sendAlert(String from, String to, LinkedList alertItems) { Object[] args = new Object[2]; args[0] = new Integer(alertItems.size()); @@ -203,7 +225,8 @@ ItemAlert itemAlert = (ItemAlert) it.next(); itemURLs.append(count++).append(". ").append(serverURL) .append("contentcheck/review_index.jsp?object=") - .append(URLEncoder.encode("["+itemAlert.getObjectType()+":{id="+itemAlert.getItemId()+"}]")) + .append(URLEncoder.encode("["+itemAlert.getObjectType() + +":{id="+itemAlert.getItemId()+"}]")) .append("&hash=") .append(itemAlert.getItemAlertHash()) .append("&oid=") @@ -214,14 +237,19 @@ } args[1] = itemURLs.toString(); - String subject = (String) GlobalizationUtil.globalize("cms.ui.content_check_alert.subject").localize(); - String body = (String) GlobalizationUtil.globalize("cms.ui.content_check_alert.body", args).localize(); + String subject = (String) GlobalizationUtil + .globalize("cms.ui.content_check_alert.subject").localize(); + String body = (String) GlobalizationUtil + .globalize("cms.ui.content_check_alert.body", args).localize(); try { - if(checkBcc != null) Mail.send(checkBcc, to, "Bcc: " + subject, body); + if(checkBcc != null) { + Mail.send(checkBcc, to, "Bcc: " + subject, body); + } Mail.send(to, from, subject, body); if (s_log.isDebugEnabled()) { - s_log.debug("Mail to:"+to+" from:"+from+" subject:"+subject+" body:"+body+" bcc:"+checkBcc); + s_log.debug("Mail to:"+to+" from:"+from+" subject:"+subject + +" body:"+body+" bcc:"+checkBcc); } return true; } catch (Exception e) { @@ -230,8 +258,14 @@ } } + /** + * + * @param alertItems + */ private void saveLastAlerts(LinkedList alertItems) { - DataOperation op = SessionManager.getSession().retrieveDataOperation("com.arsdigita.london.cms.check.updateContentCheck"); + DataOperation op = SessionManager.getSession() + .retrieveDataOperation( + "com.arsdigita.london.cms.check.updateContentCheck"); for (Iterator iter=alertItems.iterator(); iter.hasNext(); ) { ItemAlert itemAlert = (ItemAlert) iter.next(); op.setParameter("itemID", itemAlert.getItemId()); @@ -241,6 +275,9 @@ } } + /** + * + */ private static class ItemAlert { private final BigDecimal itemId; @@ -253,7 +290,8 @@ if(itemAlertHash == null || itemAlertHash.equals("null")) { //Create randam 10 char hash string - this.itemAlertHash = Long.toString(Math.abs(random.nextLong()), 79).substring(0,10); + this.itemAlertHash = Long.toString(Math + .abs(random.nextLong()),79).substring(0,10); s_log.debug("Created item alert hash " + this.itemAlertHash); } else { Modified: contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/Initializer.java =================================================================== --- contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/Initializer.java 2012-12-30 09:44:23 UTC (rev 2445) +++ contrib/camden/ccm-lbc-contentcheck/src/com/arsdigita/london/cms/check/Initializer.java 2012-12-30 09:46:08 UTC (rev 2446) @@ -18,18 +18,16 @@ package com.arsdigita.london.cms.check; -import java.util.Calendar; -import java.util.Timer; - -import org.apache.log4j.Logger; - import com.arsdigita.db.DbHelper; import com.arsdigita.persistence.pdl.ManifestSource; import com.arsdigita.persistence.pdl.NameFilter; import com.arsdigita.runtime.CompoundInitializer; -import com.arsdigita.runtime.DataInitEvent; +import com.arsdigita.runtime.ContextInitEvent; import com.arsdigita.runtime.PDLInitializer; import com.arsdigita.runtime.RuntimeConfig; +import java.util.Calendar; +import java.util.Timer; +import org.apache.log4j.Logger; /** * The CMS Content Check initializer. @@ -37,18 +35,12 @@ * @version $Id$ */ public class Initializer extends CompoundInitializer { - public final static String versionId = - "$Id$"; private static final Logger s_log = Logger.getLogger (Initializer.class); - private static final Config s_config = new Config(); + private static final Config s_config = Config.getInstance(); - static { - s_config.load(); - } - private Timer contentCheckTimer = null; public Initializer() { @@ -57,19 +49,20 @@ add(new PDLInitializer (new ManifestSource - ("ccm-ldn-content-check.pdl.mf", + ("ccm-lbc-contentcheck.pdl.mf", new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl")))); } - public void init(DataInitEvent ev) { + @Override + public void init(ContextInitEvent ev) { super.init(ev); contentCheckTimer =startContentCheck(); } - +/* Unused public static Config getConfig() { return s_config; } - +*/ public Timer startContentCheck() { String[] checkTypes = s_config.getContentCheckTypes(); Integer interval = s_config.getContentCheckInterval(); @@ -85,8 +78,12 @@ Calendar nextDay = Calendar.getInstance(); nextDay.add(Calendar.DATE, 1); - if(checkHour >= 0 && checkHour < 24) nextDay.set(Calendar.HOUR_OF_DAY, checkHour); - else nextDay.set(Calendar.HOUR_OF_DAY, 5); + if(checkHour >= 0 && checkHour < 24) { + nextDay.set(Calendar.HOUR_OF_DAY, checkHour); + } + else { + nextDay.set(Calendar.HOUR_OF_DAY, 5); + } // daily cron job //TODO uncomment |
From: <pb...@fe...> - 2012-12-30 09:44:30
|
Author: pboy Date: 2012-12-30 09:44:23 +0000 (Sun, 30 Dec 2012) New Revision: 2445 Modified: contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationLoader.java Log: Minor formatting. Modified: contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationLoader.java =================================================================== --- contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationLoader.java 2012-12-30 09:42:54 UTC (rev 2444) +++ contrib/camden/ccm-lbc-consultation/src/com/arsdigita/camden/cms/contenttypes/ConsultationLoader.java 2012-12-30 09:44:23 UTC (rev 2445) @@ -19,19 +19,15 @@ package com.arsdigita.camden.cms.contenttypes; import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader; -import com.arsdigita.domain.DomainObject; -import com.arsdigita.kernel.ACSObjectInstantiator; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.KernelExcursion; import com.arsdigita.navigation.Template; -import com.arsdigita.persistence.DataObject; import com.arsdigita.runtime.ScriptContext; import com.arsdigita.web.Application; -// import com.arsdigita.web.ApplicationSetup; import com.arsdigita.web.ApplicationType; /** - * Intializes the database after the Consultations data model has been created. + * Loads the database after the Consultations data model has been created. * * Executes nonrecurring at install time and loads (installs and initializes) * the ccm-ldn-camden-consultation package persistently into database. |
From: <pb...@fe...> - 2012-12-30 09:43:05
|
Author: pboy Date: 2012-12-30 09:42:54 +0000 (Sun, 30 Dec 2012) New Revision: 2444 Added: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml Log: Added missing files. Added: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties (rev 0) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties 2012-12-30 09:42:54 UTC (rev 2444) @@ -0,0 +1,275 @@ +# ############################################################################## +# APLAWS+ Camden Intranet bundle integration.properties, version 2.0.x +# ############################################################################## +# +# +# CORE BEBOP configuration parameters +# ############################################################################## +waf.bebop.base_page=com.arsdigita.aplaws.ui.SimplePage +waf.bebop.fancy_xsl_errors=true + +# +; dhtml editor to use (system wide) +; Xinha is default +; default: Xinha editor & src=/assets/xinha/XinhaLoader.js +; To use FCKeditor configure: +; waf.bebop.dhtml_editor=FCKeditor + +waf.categorization.show_internal_name=true + +waf.dispatcher.default_expiry=3600 + + +# CORE KERNEL configuration parameters +# ############################################################################## +waf.kernel.data_permission_check_enabled=false +waf.kernel.primary_user_identifier=email +; if you activate screen_name, forum loader does not work. +; waf.kernel.primary_user_identifier=screen_name +waf.kernel.supported_languages=en +waf.kernel.language_independent_items=true + +# CORE KERNEL.SECURITY configuration parameters +# ############################################################################## +; waf.login_config resembles DEFAULTS, but leaves off RegisterSSO, TODO CHECK!! +; config file is cad.kernel.security.SecurityConfig +waf.login_config=Request\:com.arsdigita.kernel.security.AdminLoginModule\:sufficient,Request\:com.arsdigita.kernel.security.RecoveryLoginModule\:sufficient,Request\:com.arsdigita.kernel.security.CookieLoginModule\:requisite,Register\:com.arsdigita.kernel.security.LocalLoginModule\:requisite,Register\:com.arsdigita.kernel.security.UserIDLoginModule\:requisite,Register\:com.arsdigita.kernel.security.CookieLoginModule\:optional + +# CORE MAIL configuration parameters +# ############################################################################## +waf.mail.default_from=web...@ca... + + +# CORE SEARCH.LUCENE configuration parameters +# ############################################################################## +waf.search.indexer=lucene +; Below parameter used in version 1.0.4, now outdated und not valid anymore +; May be useful to chech the lucene serach functionality. Has to be deleted +; after all QA testing +; waf.lucene.location=/var/ccm-devel/web/redhat/intratest/data/lucene + + +# CORE TEMPLATING configuration parameters +# ############################################################################## +; Searches for localized style sheet (among others) +waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver +waf.templating.stylesheet_paths=/WEB-INF/resources/aplaws-stylesheet-paths.txt + + +# CORE UI configuration parameters +# ############################################################################## +core.ui.pagemap.root_page_url=portal/ +core.ui.pagemap.workspace_url=portal/ +core.ui.pagemap.user_redirect_url=content-center/redirect.jsp +# With versin 2 moved from kernel/security to ui rsp ui.permissions and +# no longer intended to be user configurable. +# TODO CHECK what these URLS (esp. ../one) is used for. +# waf.pagemap.permission=permissions/ ; DEFAULT +# waf.pagemap.perm_single=permissions/one + + +# CORE WEB configuration parameters +# ############################################################################## +# TODO: Check what exactly happens without this parameter set (as in standard +# ldn bundle) +waf.web.cache_policy=none +; Default value is FALSE +waf.web.deactivate_cache_host_notifications=true +waf.web.dynamic_host_provider=com.arsdigita.util.servlet.HttpHost.SubsiteDynamicHostProvider + + + +# CORE WORKFLOW configuration parameters +# ############################################################################## +waf.workflow.simple.alerts_enabled=true +waf.workflow.simple.alerts_sender=ess...@ca... + +# CORE XML processing configuration parameters +# ############################################################################## +waf.xml.xsl_transformer=xalan +waf.xml.activate_full_date_formatter=true + + + +# CMS configuration parameters +# ############################################################################## +com.arsdigita.cms.allow_content_create_in_section_listing=false + +# In order to create several content-section uncomment the line below and +# list the desired content section names +#com.arsdigita.cms.loader.section_names=generic,openccm,homepages + +com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker + +# Check parameter, not part of CMSConfig +com.arsdigita.cms.check_bcc=ess...@ca... + +; Ensure default setting +com.arsdigita.cms.contentassets.ui.RelatedLinkPropertyForm.hideAdditionalResourceFields=false + +com.arsdigita.cms.default_folder_template_path=/default/aplaws-folder.jsp +com.arsdigita.cms.default_item_template_path=/default/aplaws-item.jsp +com.arsdigita.cms.default_template_resolver_class=com.arsdigita.subsite.dispatcher.SubsiteItemTemplateResolver + +; Configure dhtml editor for use in cms content-center +; Xinha is default and does work out of the box +; A CCM specific configuration file is used to prevent a mess with the standard +; configuration, default is: +; com.arsdigita.cms.dhtml_editor_config=Xinha.Config,/assets/xinha/CCMcmsXinhaConfig.js + +; to use FCKeditor: +; com.arsdigita.cms.dhtml_editor_config=FCKEditor.Config.StyleDefault?,/assets/fckeditor/config/fckconfigOpenCCM.js +; com.arsdigita.cms.dhtml_editor_hidden_buttons= +; com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS + +com.arsdigita.cms.disable_item_pfs=true + +com.arsdigita.cms.hide_admin_tabs=true +com.arsdigita.cms.hide_folder_index_checkbox=true +com.arsdigita.cms.hide_launch_date=true +com.arsdigita.cms.hide_templates_tab=false +com.arsdigita.cms.hide_timezone=true +com.arsdigita.cms.hide_udct_ui=true + +com.arsdigita.cms.image_browser.thumbnail_max_width=200 +com.arsdigita.cms.image_browser.thumbnail_max_height=150 + +com.arsdigita.cms.soon_expired_timespan_days=7 +com.arsdigita.cms.soon_expired_timespan_months=0 + +com.arsdigita.cms.unpublished_not_found=false +com.arsdigita.cms.use_section_categories=false +com.arsdigita.cms.use_streamlined_creation=true + +# config file cms.section +# TODO: the old parameter doesn't exist anymore. +# com.arsdigita.cms.default_task_alerts=Approval\:enable_ALL\:disable_LASTAUTHOR,Deploy\:finish_LASTAUTHOR +# probably new: + +# ccm-cms-assets-fileattachment +com.arsdigita.cms.contentassets.file_edit_form=uk.gov.camden.aplaws.intranet.FileMetadataForm + +# ccm-cms-types-event parameters +com.arsdigita.cms.contenttypes.event.hide_cost=true +com.arsdigita.cms.contenttypes.event.hide_date_description=false +com.arsdigita.cms.contenttypes.event.hide_event_type=true +com.arsdigita.cms.contenttypes.event.hide_link_to_map=true +com.arsdigita.cms.contenttypes.event.hide_main_contributor=true +com.arsdigita.cms.contenttypes.event.use_html_date_description=false +com.arsdigita.cms.contenttypes.event.start_year=2000 +com.arsdigita.cms.contenttypes.event.end_year_delta=5 + + +# ccm-cms-types-newsitem parameters +com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true +com.arsdigita.cms.contenttypes.newsitem.start_year=2000 +com.arsdigita.cms.contenttypes.newsitem.end_year_delta=5 + + +# AtoZ configuration parameters +# ############################################################################## +com.arsdigita.atoz.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker + +# FORUM application +# ############################################################################## +# com.arsdigita.forum.admin_can_edit_posts=true ; DEFAULT anyway +com.arsdigita.forum.allow_quick_finish=true +# com.arsdigita.forum.author_can_edit_posts=true ; DEFAULT anyway +com.arsdigita.forum.disable_page_caching=true +com.arsdigita.forum.show_new_tabs=true +com.arsdigita.forum.use_wysiwyg_editor=true + +# NAVIGATION application +# ############################################################################## +; com.arsdigita.navigation.category_menu_show_grand_children_min=1 +; com.arsdigita.navigation.category_menu_show_grand_children=adaptive +; com.arsdigita.navigation.category_menu_show_grand_children_limit=1 +; com.arsdigita.navigation.category_menu_show_grand_children_max=65536 +com.arsdigita.navigation.category_menu_show_grand_children=false +com.arsdigita.navigation.category_menu_show_nephews=false +com.arsdigita.navigation.default_cat_root_path=/navigation/ +com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/intranet-default.jsp +; uncomment the following line and edit the file to use a custom set of templates. +#com.arsdigita.navigation.templates_file=bundle/navigation/templates.txt + + +# SUBSITE configuration parameters +# ############################################################################## +com.arsdigita.subsite.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker + + +# THEMEDIRECTOR configuration parameters +# ############################################################################## +# Required to point to the package containing the theme to copy from when creating +# a new theme! (In addition to default_theme_path. Otherwise no files are copied! +themedirector.default_theme_manifest=ccm-ldn-aplaws.web.mf +# Required to denote the dir containing the default theme! +themedirector.default_theme_path=themes/static/aplaws +themedirector.theme_dev_file_watch_poll_delay=300 +themedirector.theme_pub_file_watch_poll_delay=300 + +# LDN-SEARCH application +# ############################################################################## +com.arsdigita.london.search.show_sponsored_links=true +; Comment this out or increase the num_of_threads if you really use remote search +com.arsdigita.london.search.num_threads=10 + +# # ccm-auth-http application +# auth.http.admin_email=web...@ap... +# auth.http.admin_identifier=webmaster + +# LDN Dublin Core configuration parameters +# ############################################################################## +com.arsdigita.london.cms.dublin.audience_domain=LGAL + +# LDN APLAWS integration package configuration parameters +# ############################################################################## +com.arsdigita.aplaws.override_anav_from_lgcl_mappings=false + + +# ccm-sci-bundle (Loader only) +#com.arsdigita.bundle.loader.category_files=bundle/categories/sci-nav-domain-1.00.xml,bundle/categories/sci-nav-hierarchy-1.00.xml +#com.arsdigita.bundle.loader.custom_app_instances=com.arsdigita.navigation.Navigation:scimenu:ScientificCMS Navigation Menu,com.arsdigita.navigation.Navigation:libmenu:LibreCMS Navigation Menu +#com.arsdigita.bundle.loader.domain_mappings=STD-NAV:/navigation/,STD-NAV:/generic/,STD-NAV:/portal/ + + +# ============================================================================== +# runtime specific configurations +# ============================================================================== + +waf.admin.email=web...@ap... +waf.admin.name.given=Aplaws +waf.admin.name.family=Administrator +waf.admin.password=123456 +waf.admin.password.question=12345 +waf.admin.password.answer=6 + +# waf.runtime.jdbc_url=jdbc\:postgresql\://localhost/ccm?user\=ccm&password\=ccm42web +waf.runtime.jdbc_pool_size=100 +waf.runtime.jdbc_resultset_windowsize=1 + +# XXX edit hostname +# waf.web.host=esv-crs-intraappXX.lbcamden.net\:8080 +# waf.web.server=camden-essentials.lbcamden.net\:80 +# waf.web.site_name=Camden essentials + + +# ============================================================================================= +# devel specific configurations +# ============================================================================== +com.arsdigita.aplaws.lite_load=true +waf.debug=true +waf.bebop.fancy_xsl_errors=true + +waf.admin.email=web...@ap... +waf.admin.name.given=Aplaws +waf.admin.name.family=Administrator +waf.admin.password=123456 +waf.admin.password.question=12345 +waf.admin.password.answer=6 + +waf.web.host=localhost\:8080 +waf.web.server=localhost\:8080 +waf.web.site_name=localhost + +waf.runtime.jdbc_url=jdbc\:postgresql\://localhost/lbc?user\=lbc&password\=lbc Added: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml (rev 0) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml 2012-12-30 09:42:54 UTC (rev 2444) @@ -0,0 +1,599 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app xmlns="http://java.sun.com/xml/ns/j2ee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" + version="2.4"> + + <display-name>LBC APLAWS Intranet</display-name> + <description>Content and Collaboration Management for LBC intranet</description> + + <!-- path and filename of the log4j user accessible config file + WEB-INF/conf/log4j.properties is the built-in default value --> + <context-param> + <param-name>log4j-conf-file</param-name> + <param-value>WEB-INF/conf/log4j.properties</param-value> + </context-param> + + + <!-- Require secure connection by redirect to host-port part + of parameter waf.web.secure_server --> + <filter> + <filter-name>secured</filter-name> + <filter-class>com.arsdigita.web.SecureFilter</filter-class> + </filter> + + <!-- Initialize Profiler timers + NOT USED with standard / production --> + <filter> + <filter-name>profiler</filter-name> + <filter-class>com.arsdigita.profiler.ProfilerFilter</filter-class> + </filter> + + + <filter> + <filter-name>shortcuts</filter-name> + <filter-class>com.arsdigita.shortcuts.ShortcutFilter</filter-class> + </filter> + + <filter> + <filter-name>subsite</filter-name> + <filter-class>com.arsdigita.subsite.SubsiteFilter</filter-class> + </filter> + + <filter-mapping> + <filter-name>secured</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter-mapping> + <filter-name>profiler</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter-mapping> + <filter-name>subsite</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter-mapping> + <filter-name>shortcuts</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Context Listener + required and used to initialize the runtime environment before any other + task is performed or any servlet initialized. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <listener> + <listener-class>com.arsdigita.web.CCMApplicationContextListener</listener-class> + </listener> + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + BASE SERVLET DECLARATIONS SECTION + basically requirred by ccm-core + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + + <servlet> + <servlet-name>reg</servlet-name> + <servlet-class>com.arsdigita.web.ContextRegistrationServlet</servlet-class> + <init-param> + <param-name>uri</param-name> + <param-value>/</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet> + <servlet-name>ccm-dispatcher</servlet-name> + <servlet-class>com.arsdigita.web.DispatcherServlet</servlet-class> + <load-on-startup>2</load-on-startup> + </servlet> + + <servlet> + <servlet-name>cache-manager</servlet-name> + <servlet-class>com.arsdigita.caching.CacheServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>db-test</servlet-name> + <servlet-class>com.arsdigita.web.monitoring.DBTestServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>versioning-log</servlet-name> + <servlet-class>com.arsdigita.versioning.VersioningServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>login</servlet-name> + <servlet-class>com.arsdigita.ui.login.LoginServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>webadmin</servlet-name> + <servlet-class>com.arsdigita.ui.admin.AdminServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>webadmin-permissions</servlet-name> + <servlet-class>com.arsdigita.ui.permissions.PermissionsServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>webdevsupport</servlet-name> + <servlet-class>com.arsdigita.webdevsupport.WebDevSupportServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>oid-redirect</servlet-name> + <servlet-class>com.arsdigita.web.OIDRedirectServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>resource-resolver</servlet-name> + <servlet-class>com.arsdigita.web.ResourceServlet</servlet-class> + </servlet> + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ADDITIONAL SERVLET DECLARATIONS SECTION + basically requirred by ccm-cms + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + + <servlet> + <servlet-name>content-center</servlet-name> + <servlet-class>com.arsdigita.cms.WorkspaceServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>content-section</servlet-name> + <servlet-class>com.arsdigita.cms.ContentSectionServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>cms-service</servlet-name> + <servlet-class>com.arsdigita.cms.ServiceServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>content-type-xsl</servlet-name> + <servlet-class>com.arsdigita.cms.dispatcher.ContentTypeXSLServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>content-item-xsl</servlet-name> + <servlet-class>com.arsdigita.cms.dispatcher.ContentItemXSLServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>template-xsl</servlet-name> + <servlet-class>com.arsdigita.cms.dispatcher.TemplateXSLServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>TextOnlyServlet</servlet-name> + <display-name>Text Only Servlet</display-name> + <servlet-class> + com.arsdigita.web.InternalPrefixerServlet + </servlet-class> + <init-param> + <param-name>prefix</param-name> + <param-value>/text</param-value> + </init-param> + </servlet> + + <servlet> + <servlet-name>PrintFriendlyServlet</servlet-name> + <display-name>Printer Friendly Output Servlet</display-name> + <servlet-class> + com.arsdigita.web.InternalPrefixerServlet + </servlet-class> + <init-param> + <param-name>prefix</param-name> + <param-value>/print</param-value> + </init-param> + </servlet> + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + MODULES SERVLET DECLARATIONS SECTION + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + + <!-- module ccm-atoz - servlet definitions BEGIN --> + <servlet> + <servlet-name>atoz-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-atoz</param-value> + </init-param> + </servlet> + <!-- module ccm-atoz - servlet definitions END --> + + <!-- module ccm-forum - servlet declarations BEGIN --> + <servlet> + <servlet-name>forum-main</servlet-name> + <servlet-class>com.arsdigita.forum.ForumServlet</servlet-class> + </servlet> + <!-- module ccm-forum - servlet declarations END --> + + <servlet> + <servlet-name>portalworkspace-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-portalworkspace</param-value> + </init-param> + </servlet> + + <servlet> + <servlet-name>navigation-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-navigation</param-value> + </init-param> + <init-param> + <param-name>file-resolver</param-name> + <param-value>com.arsdigita.navigation.NavigationFileResolver</param-value> + </init-param> + </servlet> + + <servlet> + <servlet-name>portlet-type-xsl</servlet-name> + <servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class> + </servlet> + + <!-- module ccm-rssfeed - servlet declaration BEGIN --> + <servlet> + <servlet-name>rssfeed-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-rssfeed</param-value> + </init-param> + <init-param> + <param-name>file-resolver</param-name> + <param-value>com.arsdigita.rssfeed.RSSFileResolver</param-value> + </init-param> + </servlet> + <!-- module ccm-rssfeed - servlet declaration END --> + + <!-- module ccm-ldn-search - servlet declarations BEGIN --> + <servlet> + <servlet-name>search-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-ldn-search</param-value> + </init-param> + </servlet> + + <servlet> + <servlet-name>AxisServlet</servlet-name> + <display-name>Apache-Axis Servlet</display-name> + <servlet-class> + org.apache.axis.transport.http.AxisServlet + </servlet-class> + </servlet> + <!-- module ccm-ldn-search - servlet declarations END --> + + <!-- module ccm-shortcuts - servlet definitions --> + <servlet> + <servlet-name>shortcuts-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-shortcuts</param-value> + </init-param> + </servlet> + + <!-- 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-ldn-terms - servlet declarations BEGIN --> + <servlet> + <servlet-name>terms-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-ldn-terms</param-value> + </init-param> + </servlet> + <!-- module ccm-ldn-terms - servlet declarations END --> + + <!-- module ccm-themedirector - servlet declarations BEGIN --> + <servlet> + <servlet-name>theme-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-themedirector</param-value> + </init-param> + </servlet> + + <servlet> + <servlet-name>ThemeDownload</servlet-name> + <servlet-class>com.arsdigita.themedirector.dispatcher.ThemeDownloadServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>ThemePreviewServlet</servlet-name> + <display-name>Servlet to allow admins to preview look/feel</display-name> + <servlet-class> + com.arsdigita.themedirector.dispatcher.InternalThemePrefixerServlet + </servlet-class> + <init-param> + <param-name>prefix</param-name> + <param-value>/theme</param-value> + </init-param> + </servlet> + <!-- module ccm-themedirector - servlet declarations END --> + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + MODULES SERVLET MAPPINGS SECTION + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + + <!-- module ccm-atoz - servlet mappings BEGIN --> + <servlet-mapping> + <servlet-name>atoz-files</servlet-name> + <url-pattern>/ccm-atoz/files/*</url-pattern> + </servlet-mapping> + <!-- module ccm-atoz - servlet mappings END --> + + <!-- module ccm-forum - servlet mappings BEGIN --> + <servlet-mapping> + <servlet-name>forum-main</servlet-name> + <url-pattern>/forum-main/main/*</url-pattern> + </servlet-mapping> + <!-- module ccm-forum - servlet mappings END --> + + <servlet-mapping> + <servlet-name>portlet-type-xsl</servlet-name> + <url-pattern>/themes/servlet/portlet-type/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>portalworkspace-files</servlet-name> + <url-pattern>/ccm-portalworkspace/files/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>navigation-files</servlet-name> + <url-pattern>/ccm-navigation/files/*</url-pattern> + </servlet-mapping> + + <!-- module ccm-rssfeed - servlet mappings BEGIN --> + <servlet-mapping> + <servlet-name>rssfeed-files</servlet-name> + <url-pattern>/ccm-rssfeed/files/*</url-pattern> + </servlet-mapping> + <!-- module ccm-rssfeed - servlet mappings END --> + + <!-- module ccm-ldn-search - servlet mappings BEGIN --> + <servlet-mapping> + <servlet-name>search-files</servlet-name> + <url-pattern>/ccm-ldn-search/files/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>AxisServlet</servlet-name> + <url-pattern>/services/*</url-pattern> + </servlet-mapping> + <!-- module ccm-ldn-search - servlet mappings END --> + + <!-- module ccm-shortcuts - servlet mappings --> + <servlet-mapping> + <servlet-name>shortcuts-files</servlet-name> + <url-pattern>/ccm-shortcuts/files/*</url-pattern> + </servlet-mapping> + + <!-- 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 --> + + <!-- module ccm-ldn-terms - servlet mappings BEGIN --> + <servlet-mapping> + <servlet-name>terms-files</servlet-name> + <url-pattern>/ccm-ldn-terms/files/*</url-pattern> + </servlet-mapping> + <!-- module ccm-ldn-terms - servlet mappings END --> + + <!-- module ccm-themedirector - servlet mappings BEGIN --> + <servlet-mapping> + <servlet-name>theme-files</servlet-name> + <url-pattern>/theme-files/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>ThemeDownload</servlet-name> + <url-pattern>/theme-files/download/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>ThemePreviewServlet</servlet-name> + <url-pattern>/theme/*</url-pattern> + </servlet-mapping> + <!-- module ccm-themedirector - servlet mappings END --> + + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + BASE SERVLET MAPPINGS SECTION + basically requirred by ccm-core + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + + <servlet-mapping> + <servlet-name>reg</servlet-name> + <url-pattern>/themes/null/reg/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>ccm-dispatcher</servlet-name> + <url-pattern>/ccm/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>cache-manager</servlet-name> + <url-pattern>/expireCache/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>db-test</servlet-name> + <url-pattern>/dbtest</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>versioning-log</servlet-name> + <url-pattern>/versioning/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>login</servlet-name> + <url-pattern>/login/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>webadmin</servlet-name> + <url-pattern>/admin/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>webadmin-permissions</servlet-name> + <url-pattern>/admin-permissions/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>webdevsupport</servlet-name> + <url-pattern>/webdevsupport/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>oid-redirect</servlet-name> + <url-pattern>/redirect/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>resource-resolver</servlet-name> + <url-pattern>/resource/*</url-pattern> + </servlet-mapping> + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ADDITIONAL SERVLET MAPPINGS SECTION + basically requirred by ccm-cms + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + + <servlet-mapping> + <servlet-name>content-center</servlet-name> + <url-pattern>/templates/servlet/content-center/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>content-section</servlet-name> + <url-pattern>/templates/servlet/content-section/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>cms-service</servlet-name> + <url-pattern>/templates/servlet/cms-service/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>content-item-xsl</servlet-name> + <url-pattern>/templates/servlet/content-item/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>content-type-xsl</servlet-name> + <url-pattern>/themes/servlet/content-type/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>template-xsl</servlet-name> + <url-pattern>/themes/servlet/template/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>TextOnlyServlet</servlet-name> + <url-pattern>/text/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>PrintFriendlyServlet</servlet-name> + <url-pattern>/print/*</url-pattern> + </servlet-mapping> + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ERROR PAGES + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + + <error-page> + <exception-type>com.arsdigita.dispatcher.AccessDeniedException</exception-type> + <location>/error/access-denied.jsp</location> + </error-page> + + <error-page> + <exception-type>com.arsdigita.dispatcher.ObjectNotFoundException</exception-type> + <location>/error/object-not-found.jsp</location> + </error-page> + + <error-page> + <exception-type>com.arsdigita.kernel.permissions.PermissionException</exception-type> + <location>/error/permission-denied.jsp</location> + </error-page> + + <error-page> + <exception-type>com.arsdigita.persistence.DbNotAvailableException</exception-type> + <location>/error/db-not-available.jsp</location> + </error-page> + + <error-page> + <exception-type>com.arsdigita.db.DbNotAvailableException</exception-type> + <location>/error/db-not-available.jsp</location> + </error-page> + + <error-page> + <exception-type>java.lang.Exception</exception-type> + <location>/error/general.jsp</location> + </error-page> + + <error-page> + <exception-type>java.lang.Error</exception-type> + <location>/error/general.jsp</location> + </error-page> + + <error-page> + <error-code>404</error-code> + <location>/error/404.jsp</location> + </error-page> + + <error-page> + <error-code>500</error-code> + <location>/error/500.jsp</location> + </error-page> + + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + TAG LIBS + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + + <taglib> + <taglib-uri>/WEB-INF/bebop-show.tld</taglib-uri> + <taglib-location>/WEB-INF/bebop-show.tld</taglib-location> + </taglib> + + <taglib> + <taglib-uri>/WEB-INF/bebop-define.tld</taglib-uri> + <taglib-location>/WEB-INF/bebop-define.tld</taglib-location> + </taglib> + +</web-app> |
Author: pboy Date: 2012-12-26 01:18:05 +0000 (Wed, 26 Dec 2012) New Revision: 2443 Added: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/applications-1-0-4.cfg contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration-1-0-4.properties contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/project.xml contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web-1-0-4.xml contrib/camden/ccm-lbc-aplaws/src/ccm-lbc-aplaws.config contrib/camden/ccm-lbc-aplaws/src/ccm-lbc-aplaws.load contrib/camden/ccm-lbc-aplaws/web/templates/ contrib/camden/ccm-lbc-aplaws/web/templates/ccm-navigation/ contrib/camden/ccm-lbc-aplaws/web/templates/ccm-navigation/navigation/ Removed: contrib/camden/ccm-lbc-aplaws/bundles/intranet/AUTHORS contrib/camden/ccm-lbc-aplaws/bundles/intranet/NEWS contrib/camden/ccm-lbc-aplaws/bundles/intranet/bundle.in contrib/camden/ccm-lbc-aplaws/bundles/intranet/ccm-bundle-camden-essentials.spec contrib/camden/ccm-lbc-aplaws/bundles/intranet/ccm-bundle-camden-essentials.spec.in contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/Makefile.am contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/applications.cfg contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml contrib/camden/ccm-lbc-aplaws/bundles/intranet/configure.in contrib/camden/ccm-lbc-aplaws/src/ccm-ldn-camden-aplaws.config contrib/camden/ccm-lbc-aplaws/src/ccm-ldn-camden-aplaws.load contrib/camden/ccm-lbc-aplaws/web/packages/ contrib/camden/ccm-lbc-aplaws/web/templates/ccm-navigation/templates/ contrib/camden/ccm-lbc-aplaws/web/templates/navigation/ Modified: contrib/camden/ccm-lbc-aplaws/application.xml contrib/camden/ccm-lbc-aplaws/pdl/uk/gov/camden/aplaws/intranet/FilteredItemListPortlet.pdl contrib/camden/ccm-lbc-aplaws/src/uk/gov/camden/aplaws/intranet/Initializer.java contrib/camden/ccm-lbc-aplaws/src/uk/gov/camden/aplaws/intranet/IntranetResourceBundle.java contrib/camden/ccm-lbc-aplaws/web/templates/ccm-navigation/navigation/intranet-default.jsp contrib/camden/ccm-lbc-aplaws/web/templates/ccm-navigation/navigation/intranet-diary.jsp contrib/camden/ccm-lbc-aplaws/web/templates/ccm-navigation/navigation/intranet-doclib.jsp contrib/camden/ccm-lbc-aplaws/web/templates/ccm-navigation/navigation/intranet-ict-diary.jsp contrib/camden/ccm-lbc-aplaws/web/templates/ccm-navigation/navigation/intranet-room.jsp Log: First basic adaptation completed. Module compiles, compiles, intranet bundle loads, system starts. Modified: contrib/camden/ccm-lbc-aplaws/application.xml =================================================================== --- contrib/camden/ccm-lbc-aplaws/application.xml 2012-12-22 14:13:36 UTC (rev 2442) +++ contrib/camden/ccm-lbc-aplaws/application.xml 2012-12-26 01:18:05 UTC (rev 2443) @@ -1,18 +1,21 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" - name="ccm-ldn-camden-intranet" - prettyName="ccm-ldn-camden-intranet" - version="1.0.1" - release="6" + name="ccm-lbc-aplaws" + prettyName="Camden APLAWS" + version="6.6.1" + release="1" webapp="ROOT"> <ccm:dependencies> + <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-types-mparticle" version="6.3.0" relation="ge"/> <ccm:requires name="ccm-cms-types-event" version="6.3.0" relation="ge"/> <ccm:requires name="ccm-cms-assets-fileattachment" version="6.3.1" relation="ge"/> - <ccm:requires name="ccm-ldn-navigation" version="6.3.0" relation="ge"/> + <ccm:requires name="ccm-navigation" version="6.3.0" relation="ge"/> <ccm:requires name="ccm-ldn-dublin" version="6.3.1" relation="ge"/> + <ccm:requires name="ccm-ldn-aplaws" version="6.6.0" relation="ge"/> </ccm:dependencies> <ccm:directories> @@ -27,7 +30,25 @@ </ccm:contacts> <ccm:description> - Camden Intranet customization + Service module which tailors the aplaws software to the London Borough of + Camden WEB sites. + + It depends on the general APLAWS service module ccm-ldn-aplaws and reuses + its code, specifically for loading navigation categories, various APLAWS + classes and custom jsp's. + + It provides for it's own + - custom specific customization parameters (cf. the bundles) for Camden + intranet und public site + - the Camden theme + - additional funktionality, e.g. Camden specific portlets. + - provides Camden specific text for messages (Camden resource bundles, + e.g. IntranetResources.properties) + + APLAWS is a collaboration and content management system which is based upon + the Red Hat Web Application Framework, which is a platform for writing + database-backed web applications in Java. + </ccm:description> </ccm:application> Deleted: contrib/camden/ccm-lbc-aplaws/bundles/intranet/AUTHORS =================================================================== Deleted: contrib/camden/ccm-lbc-aplaws/bundles/intranet/NEWS =================================================================== Deleted: contrib/camden/ccm-lbc-aplaws/bundles/intranet/bundle.in =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/bundle.in 2012-12-22 14:13:36 UTC (rev 2442) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/bundle.in 2012-12-26 01:18:05 UTC (rev 2443) @@ -1,4 +0,0 @@ -BUNDLE_NAME=camden-essentials -BUNDLE_PRETTY_NAME="Camden essentials bundle" -VERSION=1.0.0 -RELEASE=3 Deleted: contrib/camden/ccm-lbc-aplaws/bundles/intranet/ccm-bundle-camden-essentials.spec =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/ccm-bundle-camden-essentials.spec 2012-12-22 14:13:36 UTC (rev 2442) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/ccm-bundle-camden-essentials.spec 2012-12-26 01:18:05 UTC (rev 2443) @@ -1,41 +0,0 @@ -Summary: Camden essentials bundle -Name: ccm-bundle-camden-essentials -Version: 1.0.0 -Release: 3 -URL: http://www.aplaws.org.uk -Source0: %{name}-%{version}.tar.gz -License: LGPL -Group: Applications/Internet/CCM -BuildRoot: %{_tmppath}/%{name}-root -Requires: ccm-tools-bundle -Requires: ccm-core ccm-cms ccm-ldn-theme ccm-ldn-terms ccm-ldn-navigation ccm-ldn-portal ccm-ldn-util ccm-ldn-subsite ccm-ldn-atoz ccm-forum ccm-ldn-rss ccm-ldn-aplaws ccm-formbuilder-pdf ccm-ldn-search ccm-ldn-shortcuts ccm-ldn-xmlfeed ccm-ldn-importer ccm-ldn-camden-eforms ccm-ldn-dublin ccm-ldn-camden-intranet ccm-ldn-content-check ccm-cms-assets-fileattachment ccm-cms-assets-relatedlink ccm-cms-types-agenda ccm-cms-types-article ccm-cms-types-event ccm-cms-types-filestorageitem ccm-cms-types-formitem ccm-cms-types-formsectionitem ccm-cms-types-htmlform ccm-cms-types-inlinesite ccm-cms-types-job ccm-cms-types-legalnotice ccm-cms-types-minutes ccm-cms-types-newsitem ccm-cms-types-pressrelease ccm-cms-types-service ccm-cms-types-siteproxy ccm-cms-types-mparticle -BuildArch: noarch -Prefix: /usr - -%description -The Camden essentials bundle provides a mechanism to install -the pre-integrated set of APLAWS+ application. - -%prep -%setup -q - -%build -./configure --prefix=/usr -make - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -/usr/share/ccm-tools/bundles/camden-essentials/applications.cfg -/usr/share/ccm-tools/bundles/camden-essentials/integration.properties -/usr/share/ccm-tools/bundles/camden-essentials/web.xml - -%changelog -* Thu May 11 2006 Alan Pevec <ap...@re...> -- Initial build. Deleted: contrib/camden/ccm-lbc-aplaws/bundles/intranet/ccm-bundle-camden-essentials.spec.in =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/ccm-bundle-camden-essentials.spec.in 2012-12-22 14:13:36 UTC (rev 2442) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/ccm-bundle-camden-essentials.spec.in 2012-12-26 01:18:05 UTC (rev 2443) @@ -1,41 +0,0 @@ -Summary: @BUNDLE_PRETTY_NAME@ -Name: @PACKAGE@ -Version: @VERSION@ -Release: @RELEASE@ -URL: http://www.aplaws.org.uk -Source0: %{name}-%{version}.tar.gz -License: LGPL -Group: Applications/Internet/CCM -BuildRoot: %{_tmppath}/%{name}-root -Requires: ccm-tools-bundle -Requires: @REQUIRES_LIST@ -BuildArch: noarch -Prefix: /usr - -%description -The @BUNDLE_PRETTY_NAME@ provides a mechanism to install -the pre-integrated set of APLAWS+ application. - -%prep -%setup -q - -%build -./configure --prefix=/usr -make - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -/usr/share/ccm-tools/bundles/@BUNDLE_NAME@/applications.cfg -/usr/share/ccm-tools/bundles/@BUNDLE_NAME@/integration.properties -/usr/share/ccm-tools/bundles/@BUNDLE_NAME@/web.xml - -%changelog -* Thu May 11 2006 Alan Pevec <ap...@re...> -- Initial build. Deleted: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/Makefile.am =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/Makefile.am 2012-12-22 14:13:36 UTC (rev 2442) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/Makefile.am 2012-12-26 01:18:05 UTC (rev 2443) @@ -1,7 +0,0 @@ -AUTOMAKE_OPTIONS = foreign no-dependencies 1.4 - -cfgdir = $(datadir)/ccm-tools/bundles/camden-essentials -cfg_DATA = web.xml applications.cfg integration.properties - -EXTRA_DIST = $(cfg_DATA) - Copied: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/applications-1-0-4.cfg (from rev 2439, contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/applications.cfg) =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/applications-1-0-4.cfg (rev 0) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/applications-1-0-4.cfg 2012-12-26 01:18:05 UTC (rev 2443) @@ -0,0 +1,43 @@ +ccm-core +ccm-cms +ccm-ldn-theme +ccm-ldn-terms +ccm-ldn-navigation +ccm-ldn-portal +ccm-ldn-util +ccm-ldn-subsite +ccm-ldn-atoz +ccm-forum +ccm-ldn-rss +ccm-ldn-aplaws + +ccm-formbuilder-pdf +ccm-ldn-search +ccm-ldn-shortcuts +ccm-ldn-xmlfeed +ccm-ldn-importer + +ccm-ldn-camden-eforms +ccm-ldn-dublin +ccm-ldn-camden-intranet +ccm-ldn-content-check + +ccm-cms-assets-fileattachment +ccm-cms-assets-relatedlink +ccm-cms-types-agenda +ccm-cms-types-article +ccm-cms-types-event +ccm-cms-types-filestorageitem +ccm-cms-types-formitem +ccm-cms-types-formsectionitem +ccm-cms-types-htmlform +ccm-cms-types-inlinesite +ccm-cms-types-job +ccm-cms-types-legalnotice +ccm-cms-types-minutes +ccm-cms-types-newsitem +ccm-cms-types-pressrelease +ccm-cms-types-service +ccm-cms-types-siteproxy +ccm-cms-types-mparticle + Deleted: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/applications.cfg =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/applications.cfg 2012-12-22 14:13:36 UTC (rev 2442) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/applications.cfg 2012-12-26 01:18:05 UTC (rev 2443) @@ -1,43 +0,0 @@ -ccm-core -ccm-cms -ccm-ldn-theme -ccm-ldn-terms -ccm-ldn-navigation -ccm-ldn-portal -ccm-ldn-util -ccm-ldn-subsite -ccm-ldn-atoz -ccm-forum -ccm-ldn-rss -ccm-ldn-aplaws - -ccm-formbuilder-pdf -ccm-ldn-search -ccm-ldn-shortcuts -ccm-ldn-xmlfeed -ccm-ldn-importer - -ccm-ldn-camden-eforms -ccm-ldn-dublin -ccm-ldn-camden-intranet -ccm-ldn-content-check - -ccm-cms-assets-fileattachment -ccm-cms-assets-relatedlink -ccm-cms-types-agenda -ccm-cms-types-article -ccm-cms-types-event -ccm-cms-types-filestorageitem -ccm-cms-types-formitem -ccm-cms-types-formsectionitem -ccm-cms-types-htmlform -ccm-cms-types-inlinesite -ccm-cms-types-job -ccm-cms-types-legalnotice -ccm-cms-types-minutes -ccm-cms-types-newsitem -ccm-cms-types-pressrelease -ccm-cms-types-service -ccm-cms-types-siteproxy -ccm-cms-types-mparticle - Copied: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration-1-0-4.properties (from rev 2439, contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties) =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration-1-0-4.properties (rev 0) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration-1-0-4.properties 2012-12-26 01:18:05 UTC (rev 2443) @@ -0,0 +1,179 @@ +waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver +waf.templating.stylesheet_paths=/WEB-INF/resources/aplaws-stylesheet-paths.txt +waf.kernel.data_permission_check_enabled=false +waf.dispatcher.default_expiry=3600 +waf.bebop.base_page=com.arsdigita.aplaws.ui.SimplePage +waf.pagemap.root=portal/ +waf.pagemap.workspace=portal/ +waf.pagemap.login_redirect=content/content-center-redirect.jsp + +com.arsdigita.cms.default_item_template_path=/default/aplaws-item.jsp +com.arsdigita.cms.default_folder_template_path=/default/aplaws-folder.jsp +com.arsdigita.cms.default_template_resolver_class=com.arsdigita.london.subsite.dispatcher.SubsiteItemTemplateResolver +com.arsdigita.cms.disable_item_pfs=true +com.arsdigita.cms.use_section_categories=false +com.arsdigita.cms.use_streamlined_creation=true +com.arsdigita.cms.hide_admin_tabs=true +com.arsdigita.cms.hide_timezone=true +com.arsdigita.cms.hide_launch_date=true +com.arsdigita.cms.dhtml_editor_config=HTMLArea.Config.CMSStyled,/assets/htmlarea/config/Styled.js +com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS +com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker +com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true +com.arsdigita.cms.contenttypes.mparticle.template=resource:///WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp +com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate=resource:///WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-item.jsp +com.arsdigita.cms.hide_udct_ui=true +com.arsdigita.cms.hide_folder_index_checkbox=true + +com.arsdigita.london.atoz.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker +com.arsdigita.london.subsite.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker + +com.arsdigita.london.theme.default_theme_path=__ccm__/themes/aplaws +com.arsdigita.london.theme.default_theme_context= +com.arsdigita.london.theme.default_theme_manifest=ccm-ldn-aplaws.web.mf +com.arsdigita.london.search.show_sponsored_links=true + +com.arsdigita.london.cms.dublin.audience_domain=LGAL + +com.arsdigita.aplaws.override_anav_from_lgcl_mappings=false +com.arsdigita.cms.contentassets.file_edit_form=uk.gov.camden.aplaws.intranet.FileMetadataForm +com.arsdigita.cms.contentassets.ui.RelatedLinkPropertyForm.hideAdditionalResourceFields=false +com.arsdigita.cms.default_content_section=content ; no longer used /exists +com.arsdigita.cms.default_item_resolver_class=com.arsdigita.cms.dispatcher.MultilingualItemResolver ; default value +com.arsdigita.cms.default_notification_time=0 ; DEFAULT value +com.arsdigita.cms.default_task_alerts=Approval\:enable_ALL\:disable_LASTAUTHOR,Deploy\:finish_LASTAUTHOR +com.arsdigita.cms.delete_workflow_after_publication=true ; DEFAULT value +com.arsdigita.cms.hide_templates_tab=false +com.arsdigita.cms.item_adapters=resource\:WEB-INF/resources/cms-item-adapters.xml ; DEFAULT +com.arsdigita.cms.languages=en ; Parameter moved to core-kernel +com.arsdigita.cms.notify_author_on_lifecycle=true ; DEFAULT +com.arsdigita.cms.publish_lifecycle_listener_class=com.arsdigita.cms.lifecycle.PublishLifecycleListener ; DEFAULT +# Parmeter moved to package cms.publishToFile, (cad.cms.pft.listener_class), DEFAULT value anyway +com.arsdigita.cms.publish_to_file_class=com.arsdigita.cms.publishToFile.PublishToFile + +com.arsdigita.cms.save_text_cleans_word_tags=false ; DEFAULT +com.arsdigita.cms.search.disableFileAssetExtraction=false ; DEFAULT +com.arsdigita.cms.soon_expired_timespan_days=7 +com.arsdigita.cms.soon_expired_timespan_months=0 +# Location changed to /template/ccm-cms/content-section +com.arsdigita.cms.template_root_path=/packages/content-section/templates + +# Formbuilder-pdf moved to ROOT app, value changed accordingly. DEFAULT value anyway +com.arsdigita.formbuilder.pdf.xsl_file=webapps/ccm-formbuilder-pdf/xsl/main.xsl + +com.arsdigita.forum.admin_can_edit_posts=true ; DEFAULT +com.arsdigita.forum.author_can_edit_posts=true ; DEFAULT +com.arsdigita.forum.traversal_adapters=resource\:WEB-INF/resources/forum-adapters.xml ; DEFAULT + +# DEFAULT value anyway +com.arsdigita.london.atoz.traversal_adapters=resource\:WEB-INF/resources/atoz-adapters.xml +com.arsdigita.london.atoz.use_subsite_specific_navigation_category=false ; DEFAULT anyway + +com.arsdigita.london.cms.dublin.related_items_subject_domain=LGCL ; DEFAULT +com.arsdigita.london.cms.dublin.use_ccn_portal_default=false ; DEFAULT + +com.arsdigita.london.navigation.category_menu_show_grand_children=false ; OK +com.arsdigita.london.navigation.category_menu_show_nephews=false ; OK +com.arsdigita.london.navigation.default_cat_root_path=/navigation/ ; OK +com.arsdigita.london.navigation.default_content_section_url=/content/ ; REMOVED +com.arsdigita.london.navigation.default_nav_model=com.arsdigita.london.navigation.ApplicationNavigationModel ; DEFAULT +com.arsdigita.london.navigation.default_template=/packages/navigation/templates/intranet-default.jsp ; Moved, OK +com.arsdigita.london.navigation.generate_item_url=true ; DEFAULT +com.arsdigita.london.navigation.index_page_cache_lifetime=3600 ; DEFAULT +com.arsdigita.london.navigation.related_items_context=subject ; DEFAULT +com.arsdigita.london.navigation.related_items_factory=com.arsdigita.london.navigation.RelatedItemsQueryFactoryImpl ; DEFAULT +com.arsdigita.london.navigation.traversal_adapters=resource\:WEB-INF/resources/navigation-adapters.xml ; DEFAULT + +com.arsdigita.london.portal.admin_only_portlet_types= ; DEFAULT +com.arsdigita.london.portal.default_layout=30%,40%,30% ; DEFAULT +com.arsdigita.london.portal.excluded_portlet_types= ; DEFAULT +com.arsdigita.london.portal.traversal_adapters=resource\:WEB-INF/resources/portal-adapters.xml ; Modified, OK + +com.arsdigita.london.rss.categoryKey=RSS ; Moved, DEFAULT + +com.arsdigita.london.search.num_threads=10 ; DEFAULT +com.arsdigita.london.search.simple_restrict_to= ; DEFAULT empty +com.arsdigita.london.search.spider.delay=600 ; DEFAULT +com.arsdigita.london.search.spider.frequency=0 ; DEFAULT +com.arsdigita.london.search.spider.max_depth=2 ; DEFAULT +com.arsdigita.london.search.timeout=4000 ; DEFAULT + +com.arsdigita.london.subsite.front_page_application=com.arsdigita.london.portal.Workspace ; modified, DEFAULT +com.arsdigita.london.subsite.front_page_parent_url=/portal/ ; DEFAULT +com.arsdigita.london.subsite.traversal_adapters=resource\:WEB-INF/resources/subsite-adapters.xml ; DEFAULT + +com.arsdigita.london.terms.default_domain=LGCL ; DEFAULT +com.arsdigita.london.terms.traversal_adapters=resource\:WEB-INF/resources/terms-adapters.xml ; DEFAULT + +com.arsdigita.london.theme.file_extensions=jpeg jpg gif xsl css js png bmp ; Modified, OK +com.arsdigita.london.theme.theme_dev_file_watch_poll_delay=300 ; Modified OK +com.arsdigita.london.theme.theme_dev_file_watch_startup_delay=120 ; DEFAULT +com.arsdigita.london.theme.theme_pub_file_watch_poll_delay=300 ; Modified OK +com.arsdigita.london.theme.theme_pub_file_watch_startup_delay=120 ; DEFAULT +com.arsdigita.portal.create_user_workspaces=true ; DEFAULT + +waf.bebop.fancy_xsl_errors=true ; OK +waf.bebop.presentation_manager=com.arsdigita.bebop.page.PageTransformer ; DEFAULT +waf.bebop.tidy_config_file=com/arsdigita/bebop/parameters/tidy.properties ; DEFAULT +waf.debug=false ; DEFAULT +waf.dispatcher.is_caching_active=true ; DEFAULT +waf.dispatcher.static_url_prefix=/STATICII/ ; DEFAULT +waf.formbuilder.actions_help_url= ; DEFAULT +waf.formbuilder.controls_help_url= ; DEFAULT +waf.kernel.primary_user_identifier=email ; DEFAULT +waf.kernel.remember_login=true ; DEFAULT +waf.kernel.secure_login=false ; DEFAULT +; waf.login_config resembles DEFAULTS, but deaves off RegisterSSO, CHECK!! +; config file is cad.kernel.security.SecurityConfig +waf.login_config=Request\:com.arsdigita.kernel.security.AdminLoginModule\:sufficient,Request\:com.arsdigita.kernel.security.RecoveryLoginModule\:sufficient,Request\:com.arsdigita.kernel.security.CookieLoginModule\:requisite,Register\:com.arsdigita.kernel.security.LocalLoginModule\:requisite,Register\:com.arsdigita.kernel.security.UserIDLoginModule\:requisite,Register\:com.arsdigita.kernel.security.CookieLoginModule\:optional + +waf.lucene.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer ; DEFAULT +waf.lucene.interval=120 ; DEFAULT +waf.lucene.location=/var/ccm-devel/web/redhat/intratest/data/lucene ; moved OK + +waf.mail.debug=false ; DEFAULT +waf.mail.default_from=web...@ca... ; OK + +waf.pagemap.change=register/change-password ; DEFAULT, no longer user config +waf.pagemap.cookies=register/explain-persistent-cookies ; DEFAULT, no longer user config +waf.pagemap.expired=register/login-expired ; DEFAULT, no longer user config +waf.pagemap.login=register/ ; DEFAULT +waf.pagemap.logout=register/logout ; DEFAULT, no longer user config +waf.pagemap.newuser=register/new-user ; DEFAULT, no longer user config +waf.pagemap.permission=permissions/ ; DEFAULT, no longer user config +waf.pagemap.perm_single=permissions/one ; DEFAULT, no longer user config +waf.pagemap.recover=register/recover-password ; DEFAULT, no longer user config + +waf.profiler.enabled=false ; DEFAULT + +waf.runtime.jdbc_ping_interval=30000 ; DEFAULT +waf.runtime.jdbc_pool_size=100 ; OK +waf.runtime.jdbc_resultset_windowsize=1 ; DEFAULT +waf.runtime.query_cache_size=2000 ; DEFAULT +waf.runtime.thread_tagging=true ; DEFAULT + +waf.search.indexer=lucene +waf.search.intermedia.raw_content_weight=1 ; DEFAULT +waf.search.intermedia.xml_content_weight=1 ; DEFAULT +waf.search.lazy_updates=true ; DEFAULT + +waf.versioning.debug_ui_enabled=false ; DEFAULT + +waf.web.application_file_resolver=com.arsdigita.web.DefaultApplicationFileResolver ; DEFAULT +waf.web.cache_policy=none ; OK +waf.web.deactivate_cache_host_notifications=true ; OK +waf.web.default_scheme=http ; OK +waf.web.dispatcher_context_path= ; DEFAULT +waf.web.dispatcher_servlet_path=/ccm ; DEFAULT +waf.web.dynamic_host_provider=com.arsdigita.util.servlet.HttpHost.SubsiteDynamicHostProvider ; OK + +# XXX edit hostname +waf.web.host=esv-crs-intraappXX.lbcamden.net\:8080 ; OK +waf.web.server=camden-essentials.lbcamden.net\:80 ; OK +waf.web.site_name=Camden essentials ; OK + +waf.workflow.simple.alerts_enabled=true ; OK +waf.workflow.simple.alerts_sender=ess...@ca... ; OK + +com.arsdigita.cms.unpublished_not_found=false ; OK +com.arsdigita.cms.check_bcc=ess...@ca... ; TODO Check Deleted: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties 2012-12-22 14:13:36 UTC (rev 2442) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/integration.properties 2012-12-26 01:18:05 UTC (rev 2443) @@ -1,149 +0,0 @@ -waf.templating.stylesheet_resolver=com.arsdigita.templating.PatternStylesheetResolver -waf.templating.stylesheet_paths=/WEB-INF/resources/aplaws-stylesheet-paths.txt -waf.kernel.data_permission_check_enabled=false -waf.dispatcher.default_expiry=3600 -waf.bebop.base_page=com.arsdigita.aplaws.ui.SimplePage -waf.pagemap.root=portal/ -waf.pagemap.workspace=portal/ -waf.pagemap.login_redirect=content/content-center-redirect.jsp - -com.arsdigita.cms.default_item_template_path=/default/aplaws-item.jsp -com.arsdigita.cms.default_folder_template_path=/default/aplaws-folder.jsp -com.arsdigita.cms.default_template_resolver_class=com.arsdigita.london.subsite.dispatcher.SubsiteItemTemplateResolver -com.arsdigita.cms.disable_item_pfs=true -com.arsdigita.cms.use_section_categories=false -com.arsdigita.cms.use_streamlined_creation=true -com.arsdigita.cms.hide_admin_tabs=true -com.arsdigita.cms.hide_timezone=true -com.arsdigita.cms.hide_launch_date=true -com.arsdigita.cms.dhtml_editor_config=HTMLArea.Config.CMSStyled,/assets/htmlarea/config/Styled.js -com.arsdigita.cms.dhtml_editor_plugins=TableOperations,CSS -com.arsdigita.cms.category_authoring_add_form=com.arsdigita.aplaws.ui.ItemCategoryPicker -com.arsdigita.cms.contenttypes.newsitem.hide_homepage=true -com.arsdigita.cms.contenttypes.mparticle.template=resource:///WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-mparticle-item.jsp -com.arsdigita.cms.contenttypes.siteproxy.defaulttemplate=resource:///WEB-INF/content-types/com/arsdigita/cms/contenttypes/aplaws-siteproxy-item.jsp -com.arsdigita.cms.hide_udct_ui=true -com.arsdigita.cms.hide_folder_index_checkbox=true - -com.arsdigita.london.atoz.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker -com.arsdigita.london.subsite.root_category_picker=com.arsdigita.london.terms.ui.RootCategoryPicker - -com.arsdigita.london.theme.default_theme_path=__ccm__/themes/aplaws -com.arsdigita.london.theme.default_theme_context= -com.arsdigita.london.theme.default_theme_manifest=ccm-ldn-aplaws.web.mf -com.arsdigita.london.search.show_sponsored_links=true - -com.arsdigita.london.cms.dublin.audience_domain=LGAL - -com.arsdigita.aplaws.override_anav_from_lgcl_mappings=false -com.arsdigita.cms.contentassets.file_edit_form=uk.gov.camden.aplaws.intranet.FileMetadataForm -com.arsdigita.cms.contentassets.ui.RelatedLinkPropertyForm.hideAdditionalResourceFields=false -com.arsdigita.cms.default_content_section=content -com.arsdigita.cms.default_item_resolver_class=com.arsdigita.cms.dispatcher.MultilingualItemResolver -com.arsdigita.cms.default_notification_time=0 -com.arsdigita.cms.default_task_alerts=Approval\:enable_ALL\:disable_LASTAUTHOR,Deploy\:finish_LASTAUTHOR -com.arsdigita.cms.delete_workflow_after_publication=true -com.arsdigita.cms.hide_templates_tab=false -com.arsdigita.cms.item_adapters=resource\:WEB-INF/resources/cms-item-adapters.xml -com.arsdigita.cms.languages=en -com.arsdigita.cms.notify_author_on_lifecycle=true -com.arsdigita.cms.publish_lifecycle_listener_class=com.arsdigita.cms.lifecycle.PublishLifecycleListener -com.arsdigita.cms.publish_to_file_class=com.arsdigita.cms.publishToFile.PublishToFile -com.arsdigita.cms.save_text_cleans_word_tags=false -com.arsdigita.cms.search.disableFileAssetExtraction=false -com.arsdigita.cms.soon_expired_timespan_days=7 -com.arsdigita.cms.soon_expired_timespan_months=0 -com.arsdigita.cms.template_root_path=/packages/content-section/templates -com.arsdigita.formbuilder.pdf.xsl_file=webapps/ccm-formbuilder-pdf/xsl/main.xsl -com.arsdigita.forum.admin_can_edit_posts=true -com.arsdigita.forum.author_can_edit_posts=true -com.arsdigita.forum.traversal_adapters=resource\:WEB-INF/resources/forum-adapters.xml -com.arsdigita.london.atoz.traversal_adapters=resource\:WEB-INF/resources/atoz-adapters.xml -com.arsdigita.london.atoz.use_subsite_specific_navigation_category=false -com.arsdigita.london.cms.dublin.related_items_subject_domain=LGCL -com.arsdigita.london.cms.dublin.use_ccn_portal_default=false -com.arsdigita.london.navigation.category_menu_show_grand_children=false -com.arsdigita.london.navigation.category_menu_show_nephews=false -com.arsdigita.london.navigation.default_cat_root_path=/navigation/ -com.arsdigita.london.navigation.default_content_section_url=/content/ -com.arsdigita.london.navigation.default_nav_model=com.arsdigita.london.navigation.ApplicationNavigationModel -com.arsdigita.london.navigation.default_template=/packages/navigation/templates/intranet-default.jsp -com.arsdigita.london.navigation.generate_item_url=true -com.arsdigita.london.navigation.index_page_cache_lifetime=3600 -com.arsdigita.london.navigation.related_items_context=subject -com.arsdigita.london.navigation.related_items_factory=com.arsdigita.london.navigation.RelatedItemsQueryFactoryImpl -com.arsdigita.london.navigation.traversal_adapters=resource\:WEB-INF/resources/navigation-adapters.xml -com.arsdigita.london.portal.admin_only_portlet_types= -com.arsdigita.london.portal.default_layout=30%,40%,30% -com.arsdigita.london.portal.excluded_portlet_types= -com.arsdigita.london.portal.traversal_adapters=resource\:WEB-INF/resources/portal-adapters.xml -com.arsdigita.london.rss.categoryKey=RSS -com.arsdigita.london.search.num_threads=10 -com.arsdigita.london.search.simple_restrict_to= -com.arsdigita.london.search.spider.delay=600 -com.arsdigita.london.search.spider.frequency=0 -com.arsdigita.london.search.spider.max_depth=2 -com.arsdigita.london.search.timeout=4000 -com.arsdigita.london.subsite.front_page_application=com.arsdigita.london.portal.Workspace -com.arsdigita.london.subsite.front_page_parent_url=/portal/ -com.arsdigita.london.subsite.traversal_adapters=resource\:WEB-INF/resources/subsite-adapters.xml -com.arsdigita.london.terms.default_domain=LGCL -com.arsdigita.london.terms.traversal_adapters=resource\:WEB-INF/resources/terms-adapters.xml -com.arsdigita.london.theme.file_extensions=jpeg jpg gif xsl css js png bmp -com.arsdigita.london.theme.theme_dev_file_watch_poll_delay=300 -com.arsdigita.london.theme.theme_dev_file_watch_startup_delay=120 -com.arsdigita.london.theme.theme_pub_file_watch_poll_delay=300 -com.arsdigita.london.theme.theme_pub_file_watch_startup_delay=120 -com.arsdigita.portal.create_user_workspaces=true -waf.bebop.fancy_xsl_errors=true -waf.bebop.presentation_manager=com.arsdigita.bebop.page.PageTransformer -waf.bebop.tidy_config_file=com/arsdigita/bebop/parameters/tidy.properties -waf.debug=false -waf.dispatcher.is_caching_active=true -waf.dispatcher.static_url_prefix=/STATICII/ -waf.formbuilder.actions_help_url= -waf.formbuilder.controls_help_url= -waf.kernel.primary_user_identifier=email -waf.kernel.remember_login=true -waf.kernel.secure_login=false -waf.login_config=Request\:com.arsdigita.kernel.security.AdminLoginModule\:sufficient,Request\:com.arsdigita.kernel.security.RecoveryLoginModule\:sufficient,Request\:com.arsdigita.kernel.security.CookieLoginModule\:requisite,Register\:com.arsdigita.kernel.security.LocalLoginModule\:requisite,Register\:com.arsdigita.kernel.security.UserIDLoginModule\:requisite,Register\:com.arsdigita.kernel.security.CookieLoginModule\:optional -waf.lucene.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer -waf.lucene.interval=120 -waf.lucene.location=/var/ccm-devel/web/redhat/intratest/data/lucene -waf.mail.debug=false -waf.mail.default_from=web...@ca... -waf.pagemap.change=register/change-password -waf.pagemap.cookies=register/explain-persistent-cookies -waf.pagemap.expired=register/login-expired -waf.pagemap.login=register/ -waf.pagemap.logout=register/logout -waf.pagemap.newuser=register/new-user -waf.pagemap.permission=permissions/ -waf.pagemap.perm_single=permissions/one -waf.pagemap.recover=register/recover-password -waf.profiler.enabled=false -waf.runtime.jdbc_ping_interval=30000 -waf.runtime.jdbc_pool_size=100 -waf.runtime.jdbc_resultset_windowsize=1 -waf.runtime.query_cache_size=2000 -waf.runtime.thread_tagging=true -waf.search.indexer=lucene -waf.search.intermedia.raw_content_weight=1 -waf.search.intermedia.xml_content_weight=1 -waf.search.lazy_updates=true -waf.versioning.debug_ui_enabled=false -waf.web.application_file_resolver=com.arsdigita.web.DefaultApplicationFileResolver -waf.web.cache_policy=none -waf.web.deactivate_cache_host_notifications=true -waf.web.default_scheme=http -waf.web.dispatcher_context_path= -waf.web.dispatcher_servlet_path=/ccm -waf.web.dynamic_host_provider=com.arsdigita.util.servlet.HttpHost.SubsiteDynamicHostProvider -# XXX edit hostname -waf.web.host=esv-crs-intraappXX.lbcamden.net\:8080 -waf.web.server=camden-essentials.lbcamden.net\:80 -waf.web.site_name=Camden essentials -waf.workflow.simple.alerts_enabled=true -waf.workflow.simple.alerts_sender=ess...@ca... -com.arsdigita.cms.unpublished_not_found=false -com.arsdigita.cms.check_bcc=ess...@ca... Added: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/project.xml =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/project.xml (rev 0) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/project.xml 2012-12-26 01:18:05 UTC (rev 2443) @@ -0,0 +1,158 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!-- project.xml - Camden Intranet - containing all modules of the current + aplaws repository used by Camden Intranet. --> + +<ccm:project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ccm="http://ccm.redhat.com/ccm-project" + ccmVersion="6.1" + name="aplaws" + prettyName="APLAWS plus Camden Intranet" + version="2-0-0" + release="alpha01" + webxml="web.xml" + webapp="ROOT" + xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd"> + +<ccm:databases> + <ccm:database name="postgres"/> + <ccm:database name="oracle-se"/> +</ccm:databases> + + + <ccm:build> + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> +<!-- APLAWS+ set of CORE packages --> +<!-- NONE can be omitted for technical reasons / internal dependencies --> +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + +<!-- Main apps --> + <ccm:application name="ccm-core"/> + <ccm:application name="ccm-cms"/> + +<!-- Content Assets --> + +<!-- Content Types --> + <ccm:application name="ccm-cms-types-article"/> + +<!-- Applications --> + <ccm:application name="ccm-atoz"/> <!-- part of (default) theme --> + <ccm:application name="ccm-navigation"/> + <!-- ccm-portalworkspace depends on ccm-subsite - + in class ui.PortletTypeForm --> + <ccm:application name="ccm-portalworkspace"/> + <ccm:application name="ccm-portalworkspace-homepage"/> + <ccm:application name="ccm-rssfeed"/> + <ccm:application name="ccm-shortcuts"/> + <ccm:application name="ccm-subsite"/> + <ccm:application name="ccm-themedirector"/> + +<!-- LDN core extensions --> + <ccm:application name="ccm-ldn-dublin"/> + <ccm:application name="ccm-ldn-search"/> + <ccm:application name="ccm-ldn-terms"/> + <ccm:application name="ccm-ldn-util"/> + +<!-- Integration Package --> + <ccm:application name="ccm-lbc-aplaws"/> + <!-- ccm-lbc-aplaws reused code of the standard + ldn integration package and depends on it! --> + <ccm:application name="ccm-ldn-aplaws"/> + + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> +<!-- APLAWS+ OPTIONAL packages --> +<!-- Various combinations of these packages make up specific bundles --> +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> +<!-- Camden Intranet Bundle --> +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + +<!-- Intranet Bundle's Content Assets --> + <ccm:application name="ccm-cms-assets-relatedlink"/> + <ccm:application name="ccm-cms-assets-fileattachment"/> + +<!-- Intranet Bundle's Core Content Types --> + <ccm:application name="ccm-cms-types-agenda"/> + <ccm:application name="ccm-cms-types-event"/> + <ccm:application name="ccm-cms-types-filestorageitem"/> + <ccm:application name="ccm-cms-types-formitem"/> + <ccm:application name="ccm-cms-types-formsectionitem"/> + <ccm:application name="ccm-cms-types-htmlform"/> + <ccm:application name="ccm-cms-types-inlinesite"/> + <ccm:application name="ccm-cms-types-job"/> + <ccm:application name="ccm-cms-types-legalnotice"/> + <ccm:application name="ccm-cms-types-minutes"/> + <ccm:application name="ccm-cms-types-mparticle"/> + <ccm:application name="ccm-cms-types-newsitem"/> + <ccm:application name="ccm-cms-types-pressrelease"/> + <ccm:application name="ccm-cms-types-service"/> + <ccm:application name="ccm-cms-types-siteproxy"/> + <ccm:application name="ccm-cms-types-xmlfeed"/> + +<!-- Intranet Bundle's Applications --> + <ccm:application name="ccm-atoz-siteproxy"/> <!-- requires siteproxy!--> + <ccm:application name="ccm-forum"/> + <!-- Without known funcionality --> + <ccm:application name="ccm-formbuilder-pdf"/> + +<!-- Intranet Bundle's LDN extensions --> + <ccm:application name="ccm-ldn-atoz"/> + <ccm:application name="ccm-ldn-importer"/> + <ccm:application name="ccm-ldn-types-contact"/> + <ccm:application name="ccm-ldn-types-esdservice"/> + +<!-- Intranet Bundle's LBC Content Types --> + <!-- + <ccm:application name="ccm-lbc-contentcheck"/> + <ccm:application name="ccm-lbc-eforms"/> + --> + + + +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> +<!-- APLAWS+ potential ADD-ONS packages for CamdenIntranet --> +<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + +<!-- ADD-ONs Content Assets --> + <!-- + <ccm:application name="ccm-cms-assets-imagestep"/> + <ccm:application name="ccm-cms-assets-notes"/> + --> + +<!-- ADD-ONs Bundle's Content Types --> + <!-- + <ccm:application name="ccm-cms-types-bookmark"/> + <ccm:application name="ccm-cms-types-faqitem"/> + <ccm:application name="ccm-cms-types-glossaryitem"/> + <ccm:application name="ccm-cms-types-image"/> + <ccm:application name="ccm-cms-types-organization"/> + <ccm:application name="ccm-cms-types-simpleaddress"/> + --> + + +<!-- ADD-ONs Bundle's Applications --> + <!-- + <ccm:application name="ccm-auth-http"/> + <ccm:application name="ccm-bookmarks"/> + <ccm:application name="ccm-docrepo"/> + <ccm:application name="ccm-faq"/> + <ccm:application name="ccm-forum-categorised"/> + --> + <!-- currently doesn't work for unknown reason + <ccm:application name="ccm-simplesurvey"/> --> + + +<!-- ADD-ONs Bundle's LDN extensions --> + <!-- + <ccm:application name="ccm-ldn-exporter"/> + <ccm:application name="ccm-ldn-freeform"/> + --> + <!-- Without known funcionality --> + <!-- <ccm:application name="ccm-ldn-userpreferences"/> --> + + + </ccm:build> +</ccm:project> Copied: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web-1-0-4.xml (from rev 2439, contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml) =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web-1-0-4.xml (rev 0) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web-1-0-4.xml 2012-12-26 01:18:05 UTC (rev 2443) @@ -0,0 +1,337 @@ +<!DOCTYPE web-app + PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> + +<web-app> + + <filter> + <filter-name>secured</filter-name> + <filter-class>com.arsdigita.web.SecureFilter</filter-class> + </filter> + + <filter> + <filter-name>profiler</filter-name> + <filter-class>com.arsdigita.profiler.ProfilerFilter</filter-class> + </filter> + + <filter> + <filter-name>shortcuts</filter-name> + <filter-class>com.arsdigita.london.shortcuts.ShortcutFilter</filter-class> + </filter> + + <filter> + <filter-name>subsite</filter-name> + <filter-class>com.arsdigita.london.subsite.SubsiteFilter</filter-class> + </filter> + + <filter-mapping> + <filter-name>secured</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter-mapping> + <filter-name>profiler</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter-mapping> + <filter-name>subsite</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter-mapping> + <filter-name>shortcuts</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <servlet> + <servlet-name>reg</servlet-name> + <servlet-class>com.arsdigita.web.ContextRegistrationServlet</servlet-class> + <init-param> + <param-name>uri</param-name> + <param-value>/</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet> + <servlet-name>legacy-dispatcher</servlet-name> + <servlet-class>com.arsdigita.sitenode.SiteNodeDispatcher</servlet-class> + <load-on-startup>3</load-on-startup> + </servlet> + + <servlet> + <servlet-name>ccm-dispatcher</servlet-name> + <servlet-class>com.arsdigita.web.DispatcherServlet</servlet-class> + <init-param> + <param-name>fallback-servlet</param-name> + <param-value>legacy-dispatcher</param-value> + </init-param> + <load-on-startup>2</load-on-startup> + </servlet> + + <servlet> + <servlet-name>legacy-adapter</servlet-name> + <servlet-class>com.arsdigita.web.LegacyAdapterServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>cache-manager</servlet-name> + <servlet-class>com.arsdigita.caching.CacheServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>db-test</servlet-name> + <servlet-class>com.arsdigita.web.monitoring.DBTestServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>versioning-log</servlet-name> + <servlet-class>com.arsdigita.versioning.VersioningServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>oid-redirect</servlet-name> + <servlet-class>com.arsdigita.web.OIDRedirectServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>resource-resolver</servlet-name> + <servlet-class>com.arsdigita.web.ResourceServlet</servlet-class> + </servlet> + + <!-- ADDITIONAL SERVLET DECLARATIONS --> + + <servlet> + <servlet-name>content-section</servlet-name> + <servlet-class>com.arsdigita.cms.ContentSectionServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>content-type-xsl</servlet-name> + <servlet-class>com.arsdigita.cms.dispatcher.ContentTypeXSLServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>content-item-xsl</servlet-name> + <servlet-class>com.arsdigita.cms.dispatcher.ContentItemXSLServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>template-xsl</servlet-name> + <servlet-class>com.arsdigita.cms.dispatcher.TemplateXSLServlet</servlet-class> + </servlet> + + <servlet> + <servlet-name>TextOnlyServlet</servlet-name> + <display-name>Text Only Servlet</display-name> + <servlet-class> + com.arsdigita.web.InternalPrefixerServlet + </servlet-class> + <init-param> + <param-name>prefix</param-name> + <param-value>/text</param-value> + </init-param> + </servlet> + + <servlet> + <servlet-name>PrintFriendlyServlet</servlet-name> + <display-name>Printer Friendly Output Servlet</display-name> + <servlet-class> + com.arsdigita.web.InternalPrefixerServlet + </servlet-class> + <init-param> + <param-name>prefix</param-name> + <param-value>/print</param-value> + </init-param> + </servlet> + + <servlet> + <servlet-name>ThemePreviewServlet</servlet-name> + <display-name>Servlet to allow admins to preview look/feel</display-name> + <servlet-class> + com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet + </servlet-class> + <init-param> + <param-name>prefix</param-name> + <param-value>/theme</param-value> + </init-param> + </servlet> + +<!-- XXX hack --> + + <servlet> + <servlet-name>portal-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-ldn-portal</param-value> + </init-param> + </servlet> + + <servlet> + <servlet-name>navigation-files</servlet-name> + <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> + <init-param> + <param-name>template-path</param-name> + <param-value>/templates/ccm-ldn-navigation</param-value> + </init-param> + <init-param> + <param-name>file-resolver</param-name> + <param-value>com.arsdigita.london.navigation.NavigationFileResolver</param-value> + </init-param> + </servlet> + + <servlet> + <servlet-name>portlet-type-xsl</servlet-name> + <servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class> + </servlet> + + <servlet-mapping> + <servlet-name>portlet-type-xsl</servlet-name> + <url-pattern>/__ccm__/servlet/portlet-type/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>reg</servlet-name> + <url-pattern>/__ccm__/null/reg/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>portal-files</servlet-name> + <url-pattern>/ccm-ldn-portal/files/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>navigation-files</servlet-name> + <url-pattern>/ccm-ldn-navigation/files/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>ThemePreviewServlet</servlet-name> + <url-pattern>/theme/*</url-pattern> + </servlet-mapping> + + <!-- /ADDITIONAL SERVLET DECLARATIONS --> + + <servlet-mapping> + <servlet-name>ccm-dispatcher</servlet-name> + <url-pattern>/ccm/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>legacy-adapter</servlet-name> + <url-pattern>/__ccm__/servlet/legacy-adapter/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>cache-manager</servlet-name> + <url-pattern>/expireCache/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>db-test</servlet-name> + <url-pattern>/dbtest</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>versioning-log</servlet-name> + <url-pattern>/versioning/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>oid-redirect</servlet-name> + <url-pattern>/redirect/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>resource-resolver</servlet-name> + <url-pattern>/resource/*</url-pattern> + </servlet-mapping> + + <!-- ADDITIONAL SERVLET MAPPINGS --> + + <servlet-mapping> + <servlet-name>content-section</servlet-name> + <url-pattern>/__ccm__/servlet/content-section/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>content-type-xsl</servlet-name> + <url-pattern>/__ccm__/servlet/content-type/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>content-item-xsl</servlet-name> + <url-pattern>/__ccm__/servlet/content-item/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>template-xsl</servlet-name> + <url-pattern>/__ccm__/servlet/template/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>TextOnlyServlet</servlet-name> + <url-pattern>/text/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>PrintFriendlyServlet</servlet-name> + <url-pattern>/print/*</url-pattern> + </servlet-mapping> + + <!-- /ADDITIONAL SERVLET MAPPINGS --> + + <error-page> + <exception-type>com.arsdigita.dispatcher.AccessDeniedException</exception-type> + <location>/error/access-denied.jsp</location> + </error-page> + + <error-page> + <exception-type>com.arsdigita.dispatcher.ObjectNotFoundException</exception-type> + <location>/error/object-not-found.jsp</location> + </error-page> + + <error-page> + <exception-type>com.arsdigita.kernel.permissions.PermissionException</exception-type> + <location>/error/permission-denied.jsp</location> + </error-page> + + <error-page> + <exception-type>com.arsdigita.persistence.DbNotAvailableException</exception-type> + <location>/error/db-not-available.jsp</location> + </error-page> + + <error-page> + <exception-type>com.arsdigita.db.DbNotAvailableException</exception-type> + <location>/error/db-not-available.jsp</location> + </error-page> + + <error-page> + <exception-type>java.lang.Exception</exception-type> + <location>/error/general.jsp</location> + </error-page> + + <error-page> + <error-code>404</error-code> + <location>/error/404.jsp</location> + </error-page> + + <error-page> + <error-code>500</error-code> + <location>/error/500.jsp</location> + </error-page> + + <!-- TAGLIBS --> + <taglib> + <taglib-uri>/WEB-INF/bebop-show.tld</taglib-uri> + <taglib-location>/WEB-INF/bebop-show.tld</taglib-location> + </taglib> + + <taglib> + <taglib-uri>/WEB-INF/bebop-define.tld</taglib-uri> + <taglib-location>/WEB-INF/bebop-define.tld</taglib-location> + </taglib> + +</web-app> Deleted: contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml =================================================================== --- contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml 2012-12-22 14:13:36 UTC (rev 2442) +++ contrib/camden/ccm-lbc-aplaws/bundles/intranet/cfg/web.xml 2012-12-26 01:18:05 UTC (rev 2443) @@ -1,337 +0,0 @@ -<!DOCTYPE web-app - PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" - "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> - -<web-app> - - <filter> - <filter-name>secured</filter-name> - <filter-class>com.arsdigita.web.SecureFilter</filter-class> - </filter> - - <filter> - <filter-name>profiler</filter-name> - <filter-class>com.arsdigita.profiler.ProfilerFilter</filter-class> - </filter> - - <filter> - <filter-name>shortcuts</filter-name> - <filter-class>com.arsdigita.london.shortcuts.ShortcutFilter</filter-class> - </filter> - - <filter> - <filter-name>subsite</filter-name> - <filter-class>com.arsdigita.london.subsite.SubsiteFilter</filter-class> - </filter> - - <filter-mapping> - <filter-name>secured</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <filter-mapping> - <filter-name>profiler</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <filter-mapping> - <filter-name>subsite</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <filter-mapping> - <filter-name>shortcuts</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <servlet> - <servlet-name>reg</servlet-name> - <servlet-class>com.arsdigita.web.ContextRegistrationServlet</servlet-class> - <init-param> - <param-name>uri</param-name> - <param-value>/</param-value> - </init-param> - <load-on-startup>1</load-on-startup> - </servlet> - - <servlet> - <servlet-name>legacy-dispatcher</servlet-name> - <servlet-class>com.arsdigita.sitenode.SiteNodeDispatcher</servlet-class> - <load-on-startup>3</load-on-startup> - </servlet> - - <servlet> - <servlet-name>ccm-dispatcher</servlet-name> - <servlet-class>com.arsdigita.web.DispatcherServlet</servlet-class> - <init-param> - <param-name>fallback-servlet</param-name> - <param-value>legacy-dispatcher</param-value> - </init-param> - <load-on-startup>2</load-on-startup> - </servlet> - - <servlet> - <servlet-name>legacy-adapter</servlet-name> - <servlet-class>com.arsdigita.web.LegacyAdapterServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>cache-manager</servlet-name> - <servlet-class>com.arsdigita.caching.CacheServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>db-test</servlet-name> - <servlet-class>com.arsdigita.web.monitoring.DBTestServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>versioning-log</servlet-name> - <servlet-class>com.arsdigita.versioning.VersioningServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>oid-redirect</servlet-name> - <servlet-class>com.arsdigita.web.OIDRedirectServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>resource-resolver</servlet-name> - <servlet-class>com.arsdigita.web.ResourceServlet</servlet-class> - </servlet> - - <!-- ADDITIONAL SERVLET DECLARATIONS --> - - <servlet> - <servlet-name>content-section</servlet-name> - <servlet-class>com.arsdigita.cms.ContentSectionServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>content-type-xsl</servlet-name> - <servlet-class>com.arsdigita.cms.dispatcher.ContentTypeXSLServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>content-item-xsl</servlet-name> - <servlet-class>com.arsdigita.cms.dispatcher.ContentItemXSLServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>template-xsl</servlet-name> - <servlet-class>com.arsdigita.cms.dispatcher.TemplateXSLServlet</servlet-class> - </servlet> - - <servlet> - <servlet-name>TextOnlyServlet</servlet-name> - <display-name>Text Only Servlet</display-name> - <servlet-class> - com.arsdigita.web.InternalPrefixerServlet - </servlet-class> - <init-param> - <param-name>prefix</param-name> - <param-value>/text</param-value> - </init-param> - </servlet> - - <servlet> - <servlet-name>PrintFriendlyServlet</servlet-name> - <display-name>Printer Friendly Output Servlet</display-name> - <servlet-class> - com.arsdigita.web.InternalPrefixerServlet - </servlet-class> - <init-param> - <param-name>prefix</param-name> - <param-value>/print</param-value> - </init-param> - </servlet> - - <servlet> - <servlet-name>ThemePreviewServlet</servlet-name> - <display-name>Servlet to allow admins to preview look/feel</display-name> - <servlet-class> - com.arsdigita.london.theme.dispatcher.InternalThemePrefixerServlet - </servlet-class> - <init-param> - <param-name>prefix</param-name> - <param-value>/theme</param-value> - </init-param> - </servlet> - -<!-- XXX hack --> - - <servlet> - <servlet-name>portal-files</servlet-name> - <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> - <init-param> - <param-name>template-path</param-name> - <param-value>/templates/ccm-ldn-portal</param-value> - </init-param> - </servlet> - - <servlet> - <servlet-name>navigation-files</servlet-name> - <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class> - <init-param> - <param-name>template-path</param-name> - <param-value>/templates/ccm-ldn-navigation</param-value> - </init-param> - <init-param> - <param-name>file-resolver</param-name> - <param-value>com.arsdigita.london.navigation.NavigationFileResolver</param-value> - </init-param> - </servlet> - - <servlet> - <servlet-name>portlet-type-xsl</servlet-name> - <servlet-class>com.arsdigita.dispatcher.PortletTypeXSLServlet</servlet-class> - </servlet> - - <servlet-mapping> - <servlet-name>portlet-type-xsl</servlet-name> - <url-pattern>/__ccm__/servlet/portlet-type/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>reg</servlet-name> - <url-pattern>/__ccm__/null/reg/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>portal-files</servlet-name> - <url-pattern>/ccm-ldn-portal/files/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>navigation-files</servlet-name> - <url-pattern>/ccm-ldn-navigation/files/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>ThemePreviewServlet</servlet-name> - <url-pattern>/theme/*</url-pattern> - </servlet-mapping> - - <!-- /ADDITIONAL SERVLET DECLARATIONS --> - - <servlet-mapping> - <servlet-name>ccm-dispatcher</servlet-name> - <url-pattern>/ccm/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>legacy-adapter</servlet-name> - <url-pattern>/__ccm__/servlet/legacy-adapter/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>cache-manager</servlet-name> - <url-pattern>/expireCache/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>db-test</servlet-name> - <url-pattern>/dbtest</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>versioning-log</servlet-name> - <url-pattern>/versioning/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>oid-redirect</servlet-name> - <url-pattern>/redirect/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>resource-resolver</servlet-name> - <url-pattern>/resource/*</url-pattern> - </servlet-mapping> - - <!-- ADDITIONAL SERVLET MAPPINGS --> - - <servlet-mapping> - <servlet-name>content-section</servlet-name> - <url-pattern>/__ccm__/servlet/content-section/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>content-type-xsl</servlet-name> - <url-pattern>/__ccm__/servlet/content-type/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>content-item-xsl</servlet-name> - <url-pattern>/__ccm__/servlet/content-item/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>template-xsl</servlet-name> - <url-pattern>/__ccm__/servlet/template/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>TextOnlyServlet</servlet-name> - <url-pattern>/text/*</url-pattern> - </servlet-mapping> - - <servlet-mapping> - <servlet-name>PrintFriendlyServlet</servlet-name> - <url-pattern>/print/*</url-pattern> - </servlet-mapping> - - <!-- /ADDITIONAL SERVLET MAPPINGS --> - - <error-page> - <exception-type>com.arsdigita.dispatcher.AccessDeniedException</exception-type> - <location>/error/access-denied.jsp</location> - </error-page> - - <error-page> - <exception-type>com.arsdigita.dispatcher.ObjectNotFoundException</exception-type> - <location>/error/object-not-found.jsp</location> - </error-page> - - <error-page> - <exception-type>com.arsdigita.kernel.permissions.PermissionException</exception-type> - <location>/error/permission-denied.jsp</location> - </error-page> - - <error-page> - <exception-type>com.arsdigita.persistence.DbNotAvailableException</exception-type> - <location>/error/db-not-available.jsp</location> - </error-page> - - <error-page> - <exception-type>com.arsdigita.db.DbNotAvailableException</exception-type> - <location>/error/db-not-available.jsp</location> - </error-page> - - <error-page> - <exception-type>java.lang.Exception</exception-type> - <location>/error/general.jsp</location> - </error-page> - - <error-page> - <error-code>404</error-code> - <location>/error/404.... [truncated message content] |
From: <pb...@fe...> - 2012-12-22 14:13:45
|
Author: pboy Date: 2012-12-22 14:13:36 +0000 (Sat, 22 Dec 2012) New Revision: 2442 Modified: contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade Log: Next part of adaptation to version 2. NOT TESTED yet. Modified: contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade 2012-12-22 14:12:35 UTC (rev 2441) +++ contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade 2012-12-22 14:13:36 UTC (rev 2442) @@ -1,14 +1,14 @@ <upgrade> <version from="1.0.0" to="1.0.1"> - <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.0-1.0.1.sql"/> + <script sql="ccm-lbc-consultation/upgrade/::database::-1.0.0-1.0.1.sql"/> </version> <version from="1.0.1" to="1.0.2"> - <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.1-1.0.2.sql"/> + <script sql="ccm-lbc-consultation/upgrade/::database::-1.0.1-1.0.2.sql"/> </version> <version from="1.0.2" to="1.0.3"> - <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.2-1.0.3.sql"/> + <script sql="ccm-lbc-consultation/upgrade/::database::-1.0.2-1.0.3.sql"/> </version> <version from="1.0.3" to="1.1.0"> - <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.3-1.1.0.sql"/> + <script sql="ccm-lbc-consultation/upgrade/::database::-1.0.3-1.1.0.sql"/> </version> </upgrade> |
From: <pb...@fe...> - 2012-12-22 14:12:49
|
Author: pboy Date: 2012-12-22 14:12:35 +0000 (Sat, 22 Dec 2012) New Revision: 2441 Added: contrib/camden/ccm-lbc-consultation/sql/ccm-lbc-consultation/ contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.config contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.load contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade Removed: contrib/camden/ccm-lbc-consultation/sql/ccm-ldn-camden-consultation/ contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.config contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.load contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.upgrade Modified: contrib/camden/ccm-lbc-consultation/application.xml Log: Next part of adaptation to version 2. NOT TESTED yet. Modified: contrib/camden/ccm-lbc-consultation/application.xml =================================================================== --- contrib/camden/ccm-lbc-consultation/application.xml 2012-12-22 14:03:34 UTC (rev 2440) +++ contrib/camden/ccm-lbc-consultation/application.xml 2012-12-22 14:12:35 UTC (rev 2441) @@ -1,17 +1,17 @@ <?xml version="1.0"?> <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" - name="ccm-ldn-camden-consultation" + name="ccm-lbc-consultation" prettyName="Red Hat CCM Content Types" - version="1.1.0" - release="9" + version="6.6.0" + release="1" webapp="ROOT"> <ccm:dependencies> <ccm:requires name="ccm-core" version="6.1.1" relation="ge"/> <ccm:requires name="ccm-cms" version="6.1.1" relation="ge"/> <ccm:requires name="ccm-ldn-aplaws" version="1.9.1" relation="ge"/> - <ccm:requires name="ccm-ldn-navigation" version="1.4.4" relation="ge"/> <ccm:requires name="ccm-ldn-util" version="1.4.1" relation="ge"/> - <ccm:requires name="ccm-ldn-rss" version="1.4.2" relation="ge"/> + <ccm:requires name="ccm-navigation" version="1.4.4" relation="ge"/> + <ccm:requires name="ccm-rssfeed" version="1.4.2" relation="ge"/> </ccm:dependencies> <ccm:directories> <ccm:directory name="pdl"/> Copied: contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.config (from rev 2439, contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.config) =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.config (rev 0) +++ contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.config 2012-12-22 14:12:35 UTC (rev 2441) @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<registry> + <config class="com.arsdigita.camden.cms.contenttypes.ConsultationConfig" + storage="ccm-lbs-consultation/consultations.properties"/> +</registry> Copied: contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.load (from rev 2439, contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.load) =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.load (rev 0) +++ contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.load 2012-12-22 14:12:35 UTC (rev 2441) @@ -0,0 +1,17 @@ +<load> + <requires> + <table name="inits"/> + <table name="acs_objects"/> + <table name="cms_items"/> + <initializer class="com.arsdigita.cms.Initializer"/> + <initializer class="com.arsdigita.navigation.Initializer"/> + </requires> + <provides> + <table name="cam_consultations"/> + <initializer class="com.arsdigita.camden.cms.contenttypes.ConsultationInitializer"/> + </provides> + <scripts> + <schema directory="ccm-lbc-consultation"/> + <data class="com.arsdigita.camden.cms.contenttypes.ConsultationLoader"/> + </scripts> +</load> Copied: contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade (from rev 2439, contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.upgrade) =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade (rev 0) +++ contrib/camden/ccm-lbc-consultation/src/ccm-lbc-consultation.upgrade 2012-12-22 14:12:35 UTC (rev 2441) @@ -0,0 +1,14 @@ +<upgrade> + <version from="1.0.0" to="1.0.1"> + <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.0-1.0.1.sql"/> + </version> + <version from="1.0.1" to="1.0.2"> + <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.1-1.0.2.sql"/> + </version> + <version from="1.0.2" to="1.0.3"> + <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.2-1.0.3.sql"/> + </version> + <version from="1.0.3" to="1.1.0"> + <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.3-1.1.0.sql"/> + </version> +</upgrade> Deleted: contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.config =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.config 2012-12-22 14:03:34 UTC (rev 2440) +++ contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.config 2012-12-22 14:12:35 UTC (rev 2441) @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<registry> - <config class="com.arsdigita.camden.cms.contenttypes.ConsultationConfig" - storage="ccm-ldn-camden-consultation/consultations.properties"/> -</registry> Deleted: contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.load =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.load 2012-12-22 14:03:34 UTC (rev 2440) +++ contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.load 2012-12-22 14:12:35 UTC (rev 2441) @@ -1,17 +0,0 @@ -<load> - <requires> - <table name="inits"/> - <table name="acs_objects"/> - <table name="cms_items"/> - <initializer class="com.arsdigita.cms.Initializer"/> - <initializer class="com.arsdigita.london.navigation.Initializer"/> - </requires> - <provides> - <table name="cam_consultations"/> - <initializer class="com.arsdigita.camden.cms.contenttypes.ConsultationInitializer"/> - </provides> - <scripts> - <schema directory="ccm-ldn-camden-consultation"/> - <data class="com.arsdigita.camden.cms.contenttypes.ConsultationLoader"/> - </scripts> -</load> Deleted: contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.upgrade =================================================================== --- contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.upgrade 2012-12-22 14:03:34 UTC (rev 2440) +++ contrib/camden/ccm-lbc-consultation/src/ccm-ldn-camden-consultation.upgrade 2012-12-22 14:12:35 UTC (rev 2441) @@ -1,14 +0,0 @@ -<upgrade> - <version from="1.0.0" to="1.0.1"> - <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.0-1.0.1.sql"/> - </version> - <version from="1.0.1" to="1.0.2"> - <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.1-1.0.2.sql"/> - </version> - <version from="1.0.2" to="1.0.3"> - <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.2-1.0.3.sql"/> - </version> - <version from="1.0.3" to="1.1.0"> - <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.3-1.1.0.sql"/> - </version> -</upgrade> |