Singleton Property für Applications wird jetzt wieder korrekt gesetzt (Ticket #1717). Upgrade-Scripts enthalten.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2158 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2013-05-31 18:39:53 +00:00
parent 0dab49e03b
commit ad8bb933ab
76 changed files with 1109 additions and 243 deletions

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-atoz"
prettyName="A-Z"
version="6.6.2"
version="6.6.3"
release="1"
webapp="ROOT">

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.atoz.AtoZ';

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 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$
@@ default/6.6.2-6.6.3/set_singleton.sql

View File

@ -0,0 +1,24 @@
--
-- Copyright (C) 2013 Jens Pelzetter. 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$
begin;
\i default/6.6.2-6.6.3/set_singleton.sql
commit;

View File

@ -19,4 +19,7 @@
<!-- AtoZ renamed from ccm-ldn-atoz to ccm-atoz -->
<script sql="ccm-atoz/upgrade/::database::-6.6.1-6.6.2.sql"/>
</version>
<version from="6.6.2" to="6.6.3">
<script sql="ccm-atoz/upgrade/::database::-6.6.2-6.6.3.sql"/>
</version>
</upgrade>

View File

@ -15,7 +15,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.arsdigita.atoz;
import com.arsdigita.kernel.Kernel;
@ -37,17 +36,19 @@ public class Loader extends PackageLoader {
private static final Logger s_log = Logger.getLogger(Loader.class);
@Override
public void run(final ScriptContext ctx) {
new KernelExcursion() {
@Override
public void excurse() {
setEffectiveParty(Kernel.getSystemParty());
setupAtoZ();
}
}.run();
}
private void setupAtoZ() {
s_log.debug("Creating AtoZ application...");
@ -80,15 +81,15 @@ public class Loader extends PackageLoader {
* replacing blanks between words and illegal characters with an
* hyphen and converted to lower case.
* "AtoZ" will become "atoz". */
ApplicationType type = new ApplicationType("AtoZ",
final ApplicationType type = new ApplicationType("AtoZ",
AtoZ.BASE_DATA_OBJECT_TYPE);
type.setDescription("A-Z of content.");
// type.setSingleton(true); // For later use
type.setSingleton(true);
type.save();
if (!Application.isInstalled(AtoZ.BASE_DATA_OBJECT_TYPE,
"/atoz/")) {
Application app = Application.createApplication(type,
final Application app = Application.createApplication(type,
"atoz",
"AtoZ",
null);
@ -96,4 +97,5 @@ public class Loader extends PackageLoader {
}
s_log.debug("AtoZ application type created.");
}
}

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-auth-http"
prettyName="Auth HTTP"
version="6.6.0"
version="6.6.1"
release="1"
webapp="ROOT">

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.auth.http.HttpAuth';

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 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$
@@ default/6.6.2-6.6.3/set_singleton.sql

View File

@ -0,0 +1,24 @@
--
-- Copyright (C) 2013 Jens Pelzetter. 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$
begin;
\i default/6.6.0-6.6.1/set_singleton.sql
commit;

View File

@ -0,0 +1,5 @@
<upgrade>
<version from="6.6.0" to="6.6.1">
<script sql="ccm-atoz/upgrade/::database::-6.6.0-6.6.1.sql"/>
</version>
</upgrade>

View File

@ -94,6 +94,7 @@ public class Loader extends PackageLoader {
HTTPAuth.BASE_DATA_OBJECT_TYPE );
type.setDescription("CCM HTTP authentication administration");
type.setSingleton(true);
type.save();
Application admin = Application.retrieveApplicationForPath("/admin/");

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms-publicpersonalprofile"
prettyName="OpenCCM Content Type"
version="6.6.3"
version="6.6.4"
release="1"
webapp="ROOT">
<ccm:dependencies>

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.cms.publicpersonalprofile.PublicPersonalProfile';

View File

@ -0,0 +1,26 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
-- This update is only applicable for the internal development tree at
-- University of Bremen ! Don't use for the APLAWS main trunk on
-- fedorahosted!
PROMPT ScientificCMS PublicPersonalProfile 6.6.3 -> 6.6.4 Upgrade Script (Oracle)
@@ ../default/upgrade/6.6.3-6.6.4/set_singleton.sql

View File

@ -0,0 +1,29 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
-- This update is only applicable for the internal development tree at
-- University of Bremen ! Don't use for the APLAWS main trunk on
-- fedorahosted!
\echo ScientificCMS PublicPersonalProfile 6.6.3 -> 6.6.4 Upgrade Script (PostgreSQL)
begin;
\i ../default/upgrade/6.6.3-6.6.4/set_singleton.sql
commit;

View File

@ -7,4 +7,7 @@
<version from="6.6.2" to="6.6.3">
<script class="com.arsdigita.cms.contenttypes.upgrades.PublicPersonalProfileUpgrade662to563"/>
</version>
<version from="6.6.3" to="6.6.4">
<script sql="ccm-cms-publicpersonalprofile/upgrade/::database::-6.6.2-6.6.3.sql"/>
</version>
</upgrade>

View File

@ -31,6 +31,7 @@ public class PublicPersonalProfilesLoader extends PackageLoader {
final ApplicationType type = new ApplicationType(
"PublicPersonalProfile",
PublicPersonalProfiles.BASE_DATA_OBJECT_TYPE);
type.setSingleton(true);
type.setDescription("PublicPersonalProfile Viewer");
Application.createApplication(

View File

@ -0,0 +1,21 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.cms.ContentCenter';
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.cms.Service';

View File

@ -21,3 +21,5 @@
PROMPT Red Hat Enterprise CMS 6.6.7 -> 6.6.8 Upgrade Script (Oracle)
@@ ../default/upgrade/6.6.7-6.6.8/rename_workspace_to_contentcenter.sql
@@ ../default/upgrade/6.6.7-6.6.8/add_personsstr_column.sql
@@ ../default/upgrade/6.6.7-6.6.8/set_singleton.sql

View File

@ -25,5 +25,6 @@ begin;
\i ../default/upgrade/6.6.7-6.6.8/rename_workspace_to_contentcenter.sql
\i ../default/upgrade/6.6.7-6.6.8/add_personsstr_column.sql
\i ../default/upgrade/6.6.7-6.6.8/set_singleton.sql
commit;

View File

@ -188,6 +188,7 @@ public class Loader extends PackageLoader {
ContentCenter.BASE_DATA_OBJECT_TYPE);
type.setDescription("The content center workspace for content creators.");
type.setSingleton(true);
type.save();
s_log.debug("CMS ContentCenter type created.");
@ -244,6 +245,7 @@ public class Loader extends PackageLoader {
ApplicationType type = new ApplicationType("CMS Service",
Service.BASE_DATA_OBJECT_TYPE);
type.setDescription("Services to store global resources and assets.");
type.setSingleton(true);
type.save();
return type;

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-core"
prettyName="Core"
version="6.6.5"
version="6.6.6"
release="1"
shared="true"
webapp="ROOT"

View File

@ -0,0 +1,23 @@
--
-- Copyright (C) 2013 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.ui.admin.Admin';
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.ui.login.Login';
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.ui.permissions.Permissions';
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.webdevsupport.WebDevSupport';

View File

@ -0,0 +1,39 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
PROMPT Red Hat Enterprise CORE 6.6.5 -> 6.6.6 Upgrade Script (Oracle)
--
-- Remove bebop entries in apm_package* which are not used anymore.
--@@ default/6.6.3-6.6.4/remove_bebop_legacy_entries.sql
-- Remove DS entries in apm_package* which are not used anymore.
--@@ default/6.6.3-6.6.4/remove_ds_legacy_entries.sql
-- Remove sitemap entries in apm_package* which are not used anymore.
--@@ default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql
-- Remove admin entries in apm_package* which are not used anymore.
--@@ default/6.6.3-6.6.4/remove_admin_legacy_entries.sql
-- Remove permissions entries in apm_package* which are not used anymore.
--@@ default/6.6.3-6.6.4/remove_permissions_legacy_entries.sql
@@ default/6.6.5-6.6.6/set_singleton.sql

View File

@ -0,0 +1,30 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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
--
-- $$
\echo Red Hat Enterprise CORE 6.6.5-> 6.6.6 Upgrade Script (PostgreSQL)
--
--
begin;
\i default/6.6.5-6.6.6/set_singleton.sql
commit;

View File

@ -58,4 +58,8 @@
<!-- Remove old style application code (SiteNode/Packages) -->
<script sql="ccm-core/upgrade/::database::-6.6.4-6.6.5.sql"/>
</version>
<version from="6.6.5" to="6.6.6">
<!-- Set singleton property for apps included in ccm-core -->
<script sql="ccm-core/upgrade/::database::-6.6.5-6.6.6.sql"/>
</version>
</upgrade>

View File

@ -80,7 +80,6 @@ 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.
@ -97,15 +96,11 @@ 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) {
private StringParameter m_screen = new StringParameter("waf.admin.name.screen", Parameter.OPTIONAL, null) {
@Override
public Object getDefaultValue() {
String email = getEmail();
@ -120,32 +115,18 @@ public class Loader extends PackageLoader {
}
}
}
};
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,
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,
private StringParameter m_resource = new StringParameter("waf.mime.resource", Parameter.OPTIONAL,
"com/arsdigita/core/mimetypes.properties");
/**
* Recognized character sets
*/
@ -155,9 +136,7 @@ public class Loader extends PackageLoader {
new StringArrayParameter(
"waf.globalization.charsets",
Parameter.REQUIRED,
new String[] { "ISO-8859-1","UTF-8" }
);
new String[]{"ISO-8859-1", "UTF-8"});
/**
* Each entry in the "locales" list is a 4-tuple of the form
* {language, country, variant, charset}
@ -173,19 +152,14 @@ public class Loader extends PackageLoader {
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"
}
);
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.
*/
@ -213,7 +187,6 @@ public class Loader extends PackageLoader {
// /////////////////////////////////////////////////////////////////////////////
// Getter Section for Parameter Values
// /////////////////////////////////////////////////////////////////////////////
private String getEmail() {
return ((InternetAddress) get(m_email)).toString();
}
@ -287,8 +260,6 @@ public class Loader extends PackageLoader {
// /////////////////////////////////////////////////////////////////////////////
// Getter Section for Parameter Values END
// /////////////////////////////////////////////////////////////////////////////
public void run(final ScriptContext ctx) {
s_log.debug("CoreLoader run method started.");
new KernelExcursion() {
@ -329,6 +300,7 @@ public class Loader extends PackageLoader {
loadGlobalization();
}
}.run();
s_log.debug("CoreLoader run method completed.");
}
@ -394,7 +366,6 @@ public class Loader extends PackageLoader {
// Set subsite dispatcher class.
subsite.setDispatcherClass(getDispatcher());
} */
// /**
// * Create Root Site Node for loadSubsite()
// * @return root node
@ -420,9 +391,6 @@ public class Loader extends PackageLoader {
s_log.debug("CoreLoader: Going to complete method loadKernel().");
return rootNode;
} */
/**
* Ensure that at least one User with universal "admin" permission exists
* after installation.
@ -438,9 +406,8 @@ public class Loader extends PackageLoader {
String password = getPassword();
String passwordQuestion = getQuestion();
String passwordAnswer = getAnswer();
s_log.debug("createSystemAdministrator: EmailAddr: " + emailAddress +
"\n screenName: " + screenName +
"\n givenName: " + givenName );
s_log.debug("createSystemAdministrator: EmailAddr: " + emailAddress + "\n screenName: " + screenName
+ "\n givenName: " + givenName);
// Allow not creating system administrator account.
// (Specified by setting parameter
@ -461,8 +428,7 @@ public class Loader extends PackageLoader {
s_log.debug("createSystemAdministrator(): going to create new User.");
User sa = new User();
sa.setPrimaryEmail(new EmailAddress(emailAddress));
if (screenName != null &&
screenName.length() > 0) {
if (screenName != null && screenName.length() > 0) {
sa.setScreenName(screenName);
}
sa.getPersonName().setGivenName(givenName);
@ -478,9 +444,7 @@ public class Loader extends PackageLoader {
// Grant the system administrator universal "admin" permission.
s_log.debug("createSystemAdministrator(): going to grant admin perms.");
PermissionService.grantPermission
(new UniversalPermissionDescriptor
(PrivilegeDescriptor.ADMIN, sa));
PermissionService.grantPermission(new UniversalPermissionDescriptor(PrivilegeDescriptor.ADMIN, sa));
// Add system administrator to site-wide administrator group
GroupCollection groupColl = Group.retrieveAll();
@ -492,8 +456,7 @@ public class Loader extends PackageLoader {
}
groupColl.close();
s_log.debug("Adding administrator: \"" + givenName + " " +
familyName + "\" <" + emailAddress + ">");
s_log.debug("Adding administrator: \"" + givenName + " " + familyName + "\" <" + emailAddress + ">");
s_log.debug("CoreLoader: method createSystemAdministrator() completed.");
}
@ -510,6 +473,7 @@ public class Loader extends PackageLoader {
new ApplicationType("login",
Login.BASE_DATA_OBJECT_TYPE);
loginType.setDescription("CCM user login application");
loginType.setSingleton(true);
loginType.save();
@ -521,7 +485,6 @@ public class Loader extends PackageLoader {
}
/**
* Setup core Admin application. Loads type into database and instances the
* single default instance.
@ -533,6 +496,7 @@ public class Loader extends PackageLoader {
new ApplicationType("admin",
Admin.BASE_DATA_OBJECT_TYPE);
adminType.setDescription("CCM user and group administration");
adminType.setSingleton(true);
adminType.save();
@ -563,6 +527,7 @@ public class Loader extends PackageLoader {
new ApplicationType("Permissions",
Permissions.BASE_DATA_OBJECT_TYPE);
type.setDescription("CCM permissions administration");
type.setSingleton(true);
type.save();
Application app = Application.createApplication(type,
@ -588,6 +553,7 @@ public class Loader extends PackageLoader {
new ApplicationType("WebDev Support",
WebDevSupport.BASE_DATA_OBJECT_TYPE);
webDevType.setDescription("WebDeveloper Support application");
webDevType.setSingleton(true);
webDevType.save();
Application webDev = Application.createApplication(webDevType,
@ -606,8 +572,7 @@ public class Loader extends PackageLoader {
// 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);
ResourceType type = ResourceType.createResourceType("Portal", Portal.BASE_DATA_OBJECT_TYPE);
type.setDescription("A Portal!");
}
@ -627,23 +592,19 @@ public class Loader extends PackageLoader {
try {
MimeTypeRow row = new MimeTypeRow();
CSVParameterReader loader = new CSVParameterReader
(new InputStreamReader(is), row.getParameters());
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());
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()));
((TextMimeType) mime).setAllowINSOConvert("1".equals(row.getSizerOrINSO()));
}
if (mime instanceof ImageMimeType) {
((ImageMimeType) mime).setImageSizer(row.getSizerOrINSO());
@ -658,18 +619,20 @@ public class Loader extends PackageLoader {
}
}
} finally {
try { is.close(); }
catch (IOException e) { throw new UncheckedWrapperException(e); }
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.");
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();
@ -683,8 +646,7 @@ public class Loader extends PackageLoader {
try {
new OutputStreamWriter(new ByteArrayOutputStream(), charsetName);
} catch (UnsupportedEncodingException ex) {
throw new ConfigError
(charsetName + " is not a supported charset");
throw new ConfigError(charsetName + " is not a supported charset");
}
Charset charset = new Charset();
charset.setCharset(charsetName);
@ -695,10 +657,9 @@ public class Loader extends PackageLoader {
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.");
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();) {
@ -711,10 +672,8 @@ public class Loader extends PackageLoader {
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.");
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();

View File

@ -18,31 +18,27 @@
*/
package com.arsdigita.kernel.ui;
import com.arsdigita.web.Application;
import com.arsdigita.kernel.Resource;
import com.arsdigita.kernel.ResourceType;
import com.arsdigita.kernel.ui.Globalized;
import com.arsdigita.globalization.GlobalizedMessage;
import java.math.BigDecimal;
import com.arsdigita.util.Assert;
import com.arsdigita.persistence.SessionManager;
import com.arsdigita.persistence.metadata.ObjectType;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.RequestLocal;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.form.TextArea;
import com.arsdigita.bebop.form.TextField;
import com.arsdigita.bebop.form.TextArea;
import com.arsdigita.bebop.form.TextArea;
import com.arsdigita.bebop.parameters.NotEmptyValidationListener;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.kernel.Resource;
import com.arsdigita.kernel.ResourceType;
import com.arsdigita.persistence.SessionManager;
import com.arsdigita.persistence.metadata.ObjectType;
import com.arsdigita.util.Assert;
import com.arsdigita.web.Application;
import java.math.BigDecimal;
public class BasicResourceConfigFormSection
extends ResourceConfigFormSection implements Globalized {
private BigDecimal m_resourceTypeID;
private RequestLocal m_parentResourceRL;

View File

@ -0,0 +1,130 @@
package com.arsdigita.ui.admin;
import com.arsdigita.bebop.BoxPanel;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.Table;
import com.arsdigita.bebop.event.TableActionEvent;
import com.arsdigita.bebop.event.TableActionListener;
import com.arsdigita.bebop.table.TableModel;
import com.arsdigita.bebop.table.TableModelBuilder;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.packaging.Config;
import com.arsdigita.runtime.ConfigRegistry;
import com.arsdigita.util.LockableImpl;
import com.arsdigita.util.parameter.ErrorList;
import com.arsdigita.util.parameter.Parameter;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.List;
/**
* Tab for viewing and changing the settings in the registry.
*
* @author Jens Pelzetter
*/
public class SettingsTab extends BoxPanel implements AdminConstants {
private GlobalizedMessage title;
public SettingsTab() {
setClassAttr("sidebarNavPanel");
setAttribute("navbar-title", "Settings");
final BoxPanel box = new BoxPanel(BoxPanel.VERTICAL);
box.setClassAttr("main");
final ConfigRegistry registry = new ConfigRegistry();
final Config config = new Config(registry);
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
final PrintStream printStream = new PrintStream(outputStream);
config.load(printStream);
final String errors = outputStream.toString();
box.add(new Label(errors));
final List contexts = registry.getContexts();
for (Object context : contexts) {
final String storage = registry.getStorage((Class) context);
add(new Label(String.format("<strong>%s</strong>", ((Class) context).getName()), false));
}
final List parameters = config.getParameters();
for(int i = 0; i < parameters.size(); i++) {
final Parameter parameter = (Parameter) parameters.get(i);
add(new Label(parameter.getName()));
}
add(box);
}
private class SettingsTable extends Table implements TableActionListener {
public SettingsTable() {
super();
setEmptyView(new Label("No settings found"));
//Add columns here
setModelBuilder(new SettingsTableModelBuilder());
}
public void cellSelected(TableActionEvent e) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
public void headSelected(TableActionEvent e) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
}
private class SettingsTableModelBuilder extends LockableImpl implements TableModelBuilder {
@Override
public TableModel makeModel(final Table table, final PageState state) {
return new SettingsTableModel(table);
}
}
private class SettingsTableModel implements TableModel {
private final Table table;
private final String errors;
private final ConfigRegistry registry;
private final Config config;
public SettingsTableModel(final Table table) {
this.table = table;
registry = new ConfigRegistry();
config = new Config(registry);
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
final PrintStream printStream = new PrintStream(outputStream);
config.load(printStream);
errors = outputStream.toString();
}
@Override
public int getColumnCount() {
return table.getColumnModel().size();
}
public boolean nextRow() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
public Object getElementAt(int columnIndex) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
public Object getKeyAt(int columnIndex) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
}
}

View File

@ -513,13 +513,14 @@ public class ApplicationType extends ResourceType {
* Declare this ApplicationType to be a singleton. That is to
* say, there ought to only ever be one Application of this type
* directly under a given Workspace.
* @ deprecated with no replacement.
* @ throws UnsupportedOperationException when this method is
* called for an application type without a corresponding package
* type.
*
* Deprecated removed. Decided that also a new type app could be
* qualified as singleton. Specifically used in the planned app admin
* app.
*
* @ throws UnsupportedOperationException when this method is
* called for an application type without a corresponding package
* type.
*/
public void setSingleton(boolean isSingleton) {
@ -528,7 +529,6 @@ public class ApplicationType extends ResourceType {
/**
* Tell whether this ApplicationType is a singleton.
* @ deprecated with no replacement.
*/
public boolean isSingleton() {

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-ldn-search"
prettyName="Search"
version="6.6.1"
version="6.6.2"
release="1"
webapp="ROOT">
<ccm:dependencies>

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.london.search.Search';

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
@@ default/6.6.1-6.6.2/set_singleton.sql

View File

@ -17,20 +17,11 @@
--
-- $DateTime: 2010/11/10 23:15:09 $
\echo Red Hat Enterprise ccm-ldn-search 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL)
\echo Red Hat Enterprise ccm-ldn-search 6.6.1 -> 6.6.2 Upgrade Script (PostgreSQL)
begin;
-- drop table search_app - not needed anyway
\i default/6.6.0-6.6.1/drop_app_table.sql
-- remove legacy compatible bits
\i default/6.6.0-6.6.1/remove_legacy_entries.sql
-- rename application from london.subsite to subsite
-- \i default/6.6.0-6.6.1/upd_system_tables.sql
-- adjust class name in content_sections table
-- \i default/6.6.0-6.6.1/upd_cms_tables.sql
\i default/6.6.1-6.6.2/set_singleton.sql
commit;

View File

@ -0,0 +1,36 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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
--
-- $DateTime: 2010/11/10 23:15:09 $
\echo Red Hat Enterprise ccm-ldn-search 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL)
begin;
-- drop table search_app - not needed anyway
\i default/6.6.0-6.6.1/drop_app_table.sql
-- remove legacy compatible bits
\i default/6.6.0-6.6.1/remove_legacy_entries.sql
-- rename application from london.subsite to subsite
-- \i default/6.6.0-6.6.1/upd_system_tables.sql
-- adjust class name in content_sections table
-- \i default/6.6.0-6.6.1/upd_cms_tables.sql
commit;

View File

@ -2,4 +2,7 @@
<version from="6.6.0" to="6.6.1">
<script sql="ccm-ldn-search/upgrade/::database::-6.6.0-6.6.1.sql"/>
</version>
<version from="6.6.1" to="6.6.2">
<script sql="ccm-ldn-search/upgrade/::database::-6.6.1-6.6.2.sql"/>
</version>
</upgrade>

View File

@ -77,7 +77,7 @@ public class Loader extends PackageLoader {
/* Try: legacy free */
ApplicationType type = new ApplicationType("Search",
Search.BASE_DATA_OBJECT_TYPE );
type.setSingleton(true);
type.setDescription("Public search");
type.save();

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-ldn-terms"
prettyName="Terms"
version="6.6.2"
version="6.6.3"
release="1"
webapp="ROOT">
<ccm:dependencies>

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.london.terms.Terms';

View File

@ -0,0 +1,22 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
PROMPT Red Hat Enterprise TERMS 6.6.2 -> 6.6.3 Upgrade Script (Oracle)
@@ ../default/upgrade/6.6.2-6.6.3/set_singleton.sql

View File

@ -0,0 +1,26 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
\echo Red Hat Enterprise TERMS 6.6.2 -> 6.6.3 Upgrade Script (PostgreSQL)
begin;
\i ../default/upgrade/6.6.2-6.6.3/set_singleton.sql
commit;

View File

@ -21,4 +21,7 @@
<version from="6.6.1" to="6.6.2">
<script sql="ccm-ldn-terms/upgrade/::database::-6.6.1-6.6.2.sql"/>
</version>
<version from="6.6.2" to="6.6.3">
<script sql="ccm-ldn-terms/upgrade/::database::-6.6.2-6.6.3.sql"/>
</version>
</upgrade>

View File

@ -52,7 +52,7 @@ public class Loader extends PackageLoader {
ApplicationType type =
new ApplicationType( "Terms",
Terms.BASE_DATA_OBJECT_TYPE );
type.setSingleton(true);
type.setDescription("CCM Terms administration");
Application admin = Application.retrieveApplicationForPath("/admin/");

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-rssfeed"
prettyName="RSS Feed"
version="6.6.1"
version="6.6.2"
release="1"
webapp="ROOT">
<ccm:dependencies>

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.rssfeed.RSSFeed';

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
@@ default/6.6.1-6.6.2/set_singleton.sql

View File

@ -0,0 +1,26 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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
--
-- $DateTime: 2010/11/10 23:15:09 $
\echo Red Hat Enterprise ccm-rssfeed 6.6.1 -> 6.6.2 Upgrade Script (PostgreSQL)
begin;
\i default/6.6.1-6.6.2/set_singleton.sql
commit;

View File

@ -2,4 +2,7 @@
<version from="6.6.0" to="6.6.1">
<script sql="ccm-rssfeed/upgrade/::database::-6.6.0-6.6.1.sql"/>
</version>
<version from="6.6.1" to="6.6.2">
<script sql="ccm-rssfeed/upgrade/::database::-6.6.1-6.6.2.sql"/>
</version>
</upgrade>

View File

@ -99,6 +99,7 @@ public class Loader extends PackageLoader {
ApplicationType type = new ApplicationType(
"RSS Feed",
RSSFeed.BASE_DATA_OBJECT_TYPE );
type.setSingleton(true);
type.setDescription("Provides RSS feed service");
if (!Application.isInstalled(RSSFeed.BASE_DATA_OBJECT_TYPE,

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-sci-publications"
prettyName="OpenCCM Content Types"
version="6.6.4"
version="6.6.5"
release="1"
webapp="ROOT">
<ccm:dependencies>

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.cms.scipublications.SciPublications';

View File

@ -3,6 +3,7 @@
begin;
\i ../default/upgrade/6.6.4-6.6.5/vol_of_series_alphanum.sql
\i ../default/upgrade/6.6.4-6.6.5/set_singleton.sql
end;

View File

@ -246,7 +246,7 @@ public class PublicationBundle extends ContentBundle {
protected void updateAuthorsStr() {
final AuthorshipCollection authors = getAuthors();
StringBuilder builder = new StringBuilder();
final StringBuilder builder = new StringBuilder();
while (authors.next()) {
if (builder.length() > 0) {
builder.append("; ");

View File

@ -149,13 +149,13 @@ public class PublicationExtraXmlGenerator implements ExtraXMLGenerator {
}
private void createSeriesElemXml(final Series series,
final Integer volumeOfSeries,
final String volumeOfSeries,
final Element seriesElem,
final PageState state) {
final XmlGenerator generator = new XmlGenerator(series);
generator.setItemElemName("series", "");
if (volumeOfSeries != null) {
generator.addItemAttribute("volume", volumeOfSeries.toString());
generator.addItemAttribute("volume", volumeOfSeries);
}
generator.setListMode(listMode);
generator.generateXML(state, seriesElem, "");

View File

@ -247,7 +247,7 @@ public class PublicationSeriesTable
final SeriesCollection seriesCol = publication.getSeries();
Integer volumeOfSeries = null;
String volumeOfSeries = null;
while(seriesCol.next()) {
if (seriesId.equals(seriesCol.getSeries().getID())) {
volumeOfSeries = seriesCol.getVolumeOfSeries();
@ -259,7 +259,7 @@ public class PublicationSeriesTable
if (volumeOfSeries == null) {
return new Label("");
} else {
return new Label(volumeOfSeries.toString());
return new Label(volumeOfSeries);
}
}

View File

@ -108,7 +108,7 @@ public class SeriesVolumeAddForm extends BasicItemForm {
}
m_itemSearch.setVisible(state, false);
selectedVolumeLabel.setLabel(publication.getTitle(), state);
selectedVolumeLabel.setLabel(publication.getTitle());
selectedVolumeLabel.setVisible(state, true);
}
@ -140,9 +140,7 @@ public class SeriesVolumeAddForm extends BasicItemForm {
volume = (Publication) volume.getContentBundle().getInstance(series.
getLanguage());
series.addVolume(volume,
(Integer) data.get(
VolumeInSeriesCollection.VOLUME_OF_SERIES));
series.addVolume(volume, (String) data.get(VolumeInSeriesCollection.VOLUME_OF_SERIES));
} else {
VolumeInSeriesCollection volumes = series.getVolumes();
@ -198,4 +196,5 @@ public class SeriesVolumeAddForm extends BasicItemForm {
volumes.close();
}
}
}

View File

@ -29,6 +29,7 @@ public class SciPublicationsLoader extends PackageLoader {
final ApplicationType type = new ApplicationType(
"SciPublications",
SciPublications.BASE_DATA_OBJECT_TYPE);
type.setSingleton(true);
type.setDescription("Publications Import and Export");
Application.createApplication(

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-shortcuts"
prettyName="Shortcuts"
version="6.6.1"
version="6.6.2"
release="1"
webapp="ROOT">
<ccm:dependencies>

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.shortcuts.Shortcuts';

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
@@ default/6.6.1-6.6.2/set_singleton.sql

View File

@ -0,0 +1,26 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
\echo Red Hat Enterprise ccm-shortcuts 6.6.1 -> 6.6.2 Upgrade Script (PostgreSQL)
begin;
\i default/6.6.1-6.6.2/set_singleton.sql
commit;

View File

@ -2,4 +2,7 @@
<version from="6.6.0" to="6.6.1">
<script sql="ccm-shortcuts/upgrade/::database::-6.6.0-6.6.1.sql"/>
</version>
<version from="6.6.1" to="6.6.2">
<script sql="ccm-shortcuts/upgrade/::database::-6.6.1-6.6.2.sql"/>
</version>
</upgrade>

View File

@ -79,6 +79,7 @@ public class Loader extends PackageLoader {
ApplicationType type = new ApplicationType(
"Shortcuts",
Shortcuts.BASE_DATA_OBJECT_TYPE );
type.setSingleton(true);
type.setDescription("CCM Shortcuts Administration instance");
Application admin = Application.retrieveApplicationForPath("/admin/");

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-subsite"
prettyName="Subsite"
version="6.6.1"
version="6.6.2"
release="1"
webapp="ROOT">
<ccm:dependencies>

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.subsite.Subsite';

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
@@ default/6.6.1-6.6.2/set_singleton.sql

View File

@ -0,0 +1,26 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
\echo Red Hat Enterprise ccm-subsite 6.6.1 -> 6.6.2 Upgrade Script (PostgreSQL)
begin;
\i default/6.6.1-6.6.2/set_singleton.sql
commit;

View File

@ -2,4 +2,7 @@
<version from="6.6.0" to="6.6.1">
<script sql="ccm-subsite/upgrade/::database::-6.6.0-6.6.1.sql"/>
</version>
<version from="6.6.1" to="6.6.2">
<script sql="ccm-subsite/upgrade/::database::-6.6.1-6.6.2.sql"/>
</version>
</upgrade>

View File

@ -76,6 +76,7 @@ public class Loader extends PackageLoader {
ApplicationType type = new ApplicationType
("Subsite",
Subsite.BASE_DATA_OBJECT_TYPE);
type.setSingleton(true);
type.setDescription("CCM subsite administration");
Application admin = Application.retrieveApplicationForPath("/admin/");

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-themedirector"
prettyName="Theme Director"
version="6.6.2"
version="6.6.3"
release="1"
webapp="ROOT">
<ccm:dependencies>

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
UPDATE application_types SET singleton_p = true WHERE object_type = 'com.arsdigita.themedirector.ThemeDirector';

View File

@ -0,0 +1,20 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
@@ default/6.6.2-6.6.3/set_singleton.sql

View File

@ -0,0 +1,26 @@
--
-- Copyright (C) 2013 Jens Pelzetter 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$
\echo Red Hat Enterprise ccm-themedirector 6.6.2 -> 6.6.3 Upgrade Script (PostgreSQL)
begin;
\i default/6.6.2-6.6.3/set_singleton.sql
commit;

View File

@ -14,4 +14,7 @@
<version from="6.6.1" to="6.6.2">
<script sql="ccm-themedirector/upgrade/::database::-6.6.1-6.6.2.sql"/>
</version>
<version from="6.6.2" to="6.6.3">
<script sql="ccm-themedirector/upgrade/::database::-6.6.2-6.6.3.sql"/>
</version>
</upgrade>

View File

@ -67,7 +67,7 @@ public class Loader extends PackageLoader implements ThemeDirectorConstants {
ApplicationType type =
new ApplicationType( "Theme Director",
ThemeDirector.BASE_DATA_OBJECT_TYPE );
type.setSingleton(true);
type.setDescription("CCM themes administration");
Application admin = Application.retrieveApplicationForPath("/admin/");