Changes to 'refs/tags/spacewalk-schema-1.7.51-1'
by Jan Pazdziora
Tag 'spacewalk-schema-1.7.51-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2012-02-29 19:45 +0000
Tagging package [spacewalk-schema] version [1.7.51-1] in directory [schema/spacewalk/].
Changes since spacewalk-java-1.7.49-1:
Jan Pazdziora (2):
Blend is case sensitive, let's try to play by its rules.
Automatic commit of package [spacewalk-schema] release [1.7.51-1].
---
rel-eng/packages/spacewalk-schema | 2 -
schema/spacewalk/common/tables/rhnXccdfIdentSystem.sql | 31 +++++++++++++++++
schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql | 31 -----------------
schema/spacewalk/common/tables/tables.deps | 2 -
schema/spacewalk/spacewalk-schema.spec | 6 ++-
5 files changed, 38 insertions(+), 34 deletions(-)
---
11 years, 3 months
rel-eng/packages schema/spacewalk
by Jan Pazdziora
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 741338ec31e6383daa21525da8939824e0ddb01f
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Feb 29 20:45:09 2012 +0100
Automatic commit of package [spacewalk-schema] release [1.7.51-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 6681a8b..632eac5 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.7.50-1 schema/spacewalk/
+1.7.51-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 557368b..bd841b6 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.7.50
+Version: 1.7.51
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -66,6 +66,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Wed Feb 29 2012 Jan Pazdziora 1.7.51-1
+- Blend is case sensitive, let's try to play by its rules.
+- remove unused data from the rhnUserGroupType table (tlestach(a)redhat.com)
+
* Wed Feb 29 2012 Milan Zazrivec <mzazrivec(a)redhat.com> 1.7.50-1
- lookup_xccdf_ident: schema upgrade (mzazrivec(a)redhat.com)
- use pg_dblink_exec to execute inserts inside lookup_xccdf_ident
11 years, 3 months
schema/spacewalk
by Jan Pazdziora
schema/spacewalk/common/tables/rhnXccdfIdentSystem.sql | 31 +++++++++++++++++
schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql | 31 -----------------
schema/spacewalk/common/tables/tables.deps | 2 -
3 files changed, 32 insertions(+), 32 deletions(-)
New commits:
commit 4aa8899efc7b239797fa1caa597c0193c5cfe699
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Feb 29 20:42:47 2012 +0100
Blend is case sensitive, let's try to play by its rules.
Addressing
UNFOUND (rule) REFERENCES (2):
"('procs/rhnXccdfIdentSystem', 'tables/rhnXccdfIdentSystem', 'views/rhnXccdfIdentSystem', 'packages/rhnXccdfIdentSystem', 'class/rhnXccdfIdentSystem')" @procs/procs.deps:72
"('procs/rhnXccdfIdentSystem', 'tables/rhnXccdfIdentSystem', 'views/rhnXccdfIdentSystem', 'packages/rhnXccdfIdentSystem', 'class/rhnXccdfIdentSystem')" @procs/procs.deps:122
diff --git a/schema/spacewalk/common/tables/rhnXccdfIdentSystem.sql b/schema/spacewalk/common/tables/rhnXccdfIdentSystem.sql
new file mode 100644
index 0000000..3200fe1
--- /dev/null
+++ b/schema/spacewalk/common/tables/rhnXccdfIdentSystem.sql
@@ -0,0 +1,31 @@
+--
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE TABLE rhnXccdfIdentSystem
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_xccdf_identsytem_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[64k_tbs]],
+ system VARCHAR2(80) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE UNIQUE INDEX rhn_xccdf_identsystem_id_uq
+ ON rhnXccdfIdentsystem (system)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_xccdf_identsytem_id_seq;
diff --git a/schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql b/schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql
deleted file mode 100644
index af66295..0000000
--- a/schema/spacewalk/common/tables/rhnXccdfIdentsystem.sql
+++ /dev/null
@@ -1,31 +0,0 @@
---
--- Copyright (c) 2012 Red Hat, Inc.
---
--- This software is licensed to you under the GNU General Public License,
--- version 2 (GPLv2). There is NO WARRANTY for this software, express or
--- implied, including the implied warranties of MERCHANTABILITY or FITNESS
--- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
--- along with this software; if not, see
--- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
---
--- Red Hat trademarks are not licensed under GPLv2. No permission is
--- granted to use or replicate Red Hat trademarks that are incorporated
--- in this software or its documentation.
---
-
-CREATE TABLE rhnXccdfIdentsystem
-(
- id NUMBER NOT NULL
- CONSTRAINT rhn_xccdf_identsytem_id_pk PRIMARY KEY
- USING INDEX TABLESPACE [[64k_tbs]],
- system VARCHAR2(80) NOT NULL
-)
-ENABLE ROW MOVEMENT
-;
-
-CREATE UNIQUE INDEX rhn_xccdf_identsystem_id_uq
- ON rhnXccdfIdentsystem (system)
- TABLESPACE [[64k_tbs]]
- NOLOGGING;
-
-CREATE SEQUENCE rhn_xccdf_identsytem_id_seq;
diff --git a/schema/spacewalk/common/tables/tables.deps b/schema/spacewalk/common/tables/tables.deps
index 1233b42..384ae03 100644
--- a/schema/spacewalk/common/tables/tables.deps
+++ b/schema/spacewalk/common/tables/tables.deps
@@ -259,6 +259,6 @@ web_user_contact_permission :: web_contact
web_user_site_info :: web_contact web_user_site_type
web_user_personal_info :: web_contact web_user_prefix
rhnActionScap :: rhnAction
-rhnXccdfIdent :: rhnXccdfIdentsystem
+rhnXccdfIdent :: rhnXccdfIdentSystem
rhnXccdfRuleresult :: rhnXccdfTestresult rhnXccdfIdent rhnXccdfRuleresultType
rhnXccdfTestresult :: rhnServer rhnActionScap rhnXccdfBenchmark rhnXccdfProfile
11 years, 3 months
Changes to 'refs/tags/spacewalk-java-1.7.49-1'
by Tomas Lestach
Tag 'spacewalk-java-1.7.49-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2012-02-29 18:06 +0000
Tagging package [spacewalk-java] version [1.7.49-1] in directory [java/].
Changes since spacewalk-schema-1.7.50-1:
Tomas Lestach (70):
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
removing dead code
remove unused protected static final attributes
remove unused protected static final attribute
remove unused public static final attribute
remove unused protected static final attribute
remove unused public static final attributes
remove unused public static final attributes
remove unused public static final attributes
remove unused public static final attributes
remove whole KickstartQueries
remove unused public static final attribute
remove unused public static final attribute
remove unused public static final attribute
remove unused public static final attribute
remove unused public static final attribute
remove unused public static final attribute
remove unused public static final attribute
remove unused public static final attributes
remove unused data from the rhnUserGroupType table
remove unused public static final attribute
remove unused public static final attribute
remove unused public static final attribute and appropriate queries
remove unused public static final attributes
remove unused method
remove unused method
remove unused methods
remove unused methods
remove unused method
remove unused method
remove unused method and appropriate sql-query
remove unused method
remove unused method and appropriate sql-query
remove unused methods
remove unused methods with appropriate queries
remove unused method
remove unused methods and appropriate hbm query
remove unused method
remove unused methods
remove unused methods and appropriate queries
deleting rhnDownloads and rhnChannelDownloads related java code
remove unused method
remove unused method
remove unused method
remove unused methods
remove unused methods and appropriate hbm queries
remove unused method
remove unused methods
remove unused methods
remove unused methods
remove unused method and appropriate query
remove unused method and appropriate query
remove unused method and appropriate query
Automatic commit of package [spacewalk-java] release [1.7.49-1].
---
java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java | 12
java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 158 ------
java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml | 12
java/code/src/com/redhat/rhn/common/db/datasource/xml/Set_queries.xml | 24 -
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 19
java/code/src/com/redhat/rhn/common/db/datasource/xml/User_queries.xml | 9
java/code/src/com/redhat/rhn/common/security/acl/ChannelAclHandler.java | 19
java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java | 14
java/code/src/com/redhat/rhn/domain/action/ActionFactory.java | 16
java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml | 6
java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml | 29 -
java/code/src/com/redhat/rhn/domain/channel/Channel.java | 25 -
java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java | 61 --
java/code/src/com/redhat/rhn/domain/common/ArchType.hbm.xml | 3
java/code/src/com/redhat/rhn/domain/common/Checksum.hbm.xml | 4
java/code/src/com/redhat/rhn/domain/common/ChecksumFactory.java | 67 --
java/code/src/com/redhat/rhn/domain/common/ChecksumTypeException.java | 54 --
java/code/src/com/redhat/rhn/domain/common/CommonFactory.java | 32 -
java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java | 77 ---
java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml | 19
java/code/src/com/redhat/rhn/domain/kickstart/KickstartCommandComparator.java | 51 --
java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java | 2
java/code/src/com/redhat/rhn/domain/kickstart/KickstartQueries.java | 51 --
java/code/src/com/redhat/rhn/domain/org/OrgFactory.java | 29 -
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java | 15
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupImpl.hbm.xml | 3
java/code/src/com/redhat/rhn/domain/rhnpackage/PackageFactory.java | 25 -
java/code/src/com/redhat/rhn/domain/rhnpackage/Package_satellite.hbm.xml | 13
java/code/src/com/redhat/rhn/domain/rhnset/SetCleanup.java | 4
java/code/src/com/redhat/rhn/domain/role/RoleFactory.java | 15
java/code/src/com/redhat/rhn/domain/server/ServerConstants.java | 2
java/code/src/com/redhat/rhn/domain/task/TaskFactory.java | 55 --
java/code/src/com/redhat/rhn/domain/token/ActivationKey.java | 16
java/code/src/com/redhat/rhn/domain/user/UserFactory.java | 19
java/code/src/com/redhat/rhn/frontend/action/channel/ISODownloadAction.java | 143 ------
java/code/src/com/redhat/rhn/frontend/action/channel/PackageSearchHelper.java | 20
java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/configuration/BaseRankChannels.java | 2
java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/ImportFileConfirmSubmitAction.java | 121 -----
java/code/src/com/redhat/rhn/frontend/action/groups/BaseListAction.java | 8
java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java | 1
java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartHelper.java | 27 -
java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartVariableAction.java | 5
java/code/src/com/redhat/rhn/frontend/action/kickstart/tree/BaseTreeAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java | 1
java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchSetupAction.java | 11
java/code/src/com/redhat/rhn/frontend/action/systems/groups/BaseListAction.java | 21
java/code/src/com/redhat/rhn/frontend/dto/BaseDto.java | 4
java/code/src/com/redhat/rhn/frontend/dto/ChannelFamilySystem.java | 18
java/code/src/com/redhat/rhn/frontend/dto/ChannelTreeNode.java | 15
java/code/src/com/redhat/rhn/frontend/dto/CommandParameterValue.java | 66 --
java/code/src/com/redhat/rhn/frontend/dto/ISOImage.java | 230 ----------
java/code/src/com/redhat/rhn/frontend/dto/ISOSet.java | 107 ----
java/code/src/com/redhat/rhn/frontend/dto/OrgDeleteDto.java | 58 --
java/code/src/com/redhat/rhn/frontend/dto/monitoring/ProbeDto.java | 101 ----
java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceFactory.java | 3
java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceInitializationException.java | 57 --
java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/DuplicatePackageKeyException.java | 48 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidIpRangeException.java | 49 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidPackageKeyException.java | 48 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidSatCertException.java | 59 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/MethodNotFoundException.java | 59 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSatChanForVersionException.java | 62 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchArchException.java | 47 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/NotActivatedSatelliteException.java | 59 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/SatelliteIsAProxyException.java | 62 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/LabelAlreadyExistsException.java | 36 -
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ManagedServerGroupSerializer.java | 1
java/code/src/com/redhat/rhn/manager/action/ActionManager.java | 18
java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java | 90 ---
java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java | 9
java/code/src/com/redhat/rhn/manager/download/DownloadManager.java | 25 -
java/code/src/com/redhat/rhn/manager/entitlement/EntitlementManager.java | 8
java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java | 86 ---
java/code/src/com/redhat/rhn/manager/kickstart/KickstartPrePostCommand.java | 191 --------
java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java | 28 -
java/code/src/com/redhat/rhn/manager/system/SystemManager.java | 9
java/code/src/com/redhat/rhn/manager/user/UserManager.java | 32 -
java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java | 33 -
java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java | 2
java/code/src/org/cobbler/CobblerObject.java | 2
java/code/webapp/WEB-INF/struts-config.xml | 11
java/spacewalk-java.spec | 74 +++
rel-eng/packages/spacewalk-java | 2
schema/spacewalk/common/data/rhnUserGroupType.sql | 18
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-rhnUserGroupType_data.sql | 3
87 files changed, 95 insertions(+), 3060 deletions(-)
---
11 years, 3 months
70 commits - java/code java/spacewalk-java.spec rel-eng/packages schema/spacewalk
by Tomas Lestach
java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java | 12
java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 158 ------
java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml | 12
java/code/src/com/redhat/rhn/common/db/datasource/xml/Set_queries.xml | 24 -
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 19
java/code/src/com/redhat/rhn/common/db/datasource/xml/User_queries.xml | 9
java/code/src/com/redhat/rhn/common/security/acl/ChannelAclHandler.java | 19
java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java | 14
java/code/src/com/redhat/rhn/domain/action/ActionFactory.java | 16
java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml | 6
java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml | 29 -
java/code/src/com/redhat/rhn/domain/channel/Channel.java | 25 -
java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java | 61 --
java/code/src/com/redhat/rhn/domain/common/ArchType.hbm.xml | 3
java/code/src/com/redhat/rhn/domain/common/Checksum.hbm.xml | 4
java/code/src/com/redhat/rhn/domain/common/ChecksumFactory.java | 67 --
java/code/src/com/redhat/rhn/domain/common/ChecksumTypeException.java | 54 --
java/code/src/com/redhat/rhn/domain/common/CommonFactory.java | 32 -
java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java | 77 ---
java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml | 19
java/code/src/com/redhat/rhn/domain/kickstart/KickstartCommandComparator.java | 51 --
java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java | 2
java/code/src/com/redhat/rhn/domain/kickstart/KickstartQueries.java | 51 --
java/code/src/com/redhat/rhn/domain/org/OrgFactory.java | 29 -
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java | 15
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupImpl.hbm.xml | 3
java/code/src/com/redhat/rhn/domain/rhnpackage/PackageFactory.java | 25 -
java/code/src/com/redhat/rhn/domain/rhnpackage/Package_satellite.hbm.xml | 13
java/code/src/com/redhat/rhn/domain/rhnset/SetCleanup.java | 4
java/code/src/com/redhat/rhn/domain/role/RoleFactory.java | 15
java/code/src/com/redhat/rhn/domain/server/ServerConstants.java | 2
java/code/src/com/redhat/rhn/domain/task/TaskFactory.java | 55 --
java/code/src/com/redhat/rhn/domain/token/ActivationKey.java | 16
java/code/src/com/redhat/rhn/domain/user/UserFactory.java | 19
java/code/src/com/redhat/rhn/frontend/action/channel/ISODownloadAction.java | 143 ------
java/code/src/com/redhat/rhn/frontend/action/channel/PackageSearchHelper.java | 20
java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/configuration/BaseRankChannels.java | 2
java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/ImportFileConfirmSubmitAction.java | 121 -----
java/code/src/com/redhat/rhn/frontend/action/groups/BaseListAction.java | 8
java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java | 1
java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartHelper.java | 27 -
java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartVariableAction.java | 5
java/code/src/com/redhat/rhn/frontend/action/kickstart/tree/BaseTreeAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java | 1
java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchSetupAction.java | 11
java/code/src/com/redhat/rhn/frontend/action/systems/groups/BaseListAction.java | 21
java/code/src/com/redhat/rhn/frontend/dto/BaseDto.java | 4
java/code/src/com/redhat/rhn/frontend/dto/ChannelFamilySystem.java | 18
java/code/src/com/redhat/rhn/frontend/dto/ChannelTreeNode.java | 15
java/code/src/com/redhat/rhn/frontend/dto/CommandParameterValue.java | 66 --
java/code/src/com/redhat/rhn/frontend/dto/ISOImage.java | 230 ----------
java/code/src/com/redhat/rhn/frontend/dto/ISOSet.java | 107 ----
java/code/src/com/redhat/rhn/frontend/dto/OrgDeleteDto.java | 58 --
java/code/src/com/redhat/rhn/frontend/dto/monitoring/ProbeDto.java | 101 ----
java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceFactory.java | 3
java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceInitializationException.java | 57 --
java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/DuplicatePackageKeyException.java | 48 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidIpRangeException.java | 49 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidPackageKeyException.java | 48 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidSatCertException.java | 59 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/MethodNotFoundException.java | 59 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSatChanForVersionException.java | 62 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchArchException.java | 47 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/NotActivatedSatelliteException.java | 59 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/SatelliteIsAProxyException.java | 62 --
java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/LabelAlreadyExistsException.java | 36 -
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ManagedServerGroupSerializer.java | 1
java/code/src/com/redhat/rhn/manager/action/ActionManager.java | 18
java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java | 90 ---
java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java | 9
java/code/src/com/redhat/rhn/manager/download/DownloadManager.java | 25 -
java/code/src/com/redhat/rhn/manager/entitlement/EntitlementManager.java | 8
java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java | 86 ---
java/code/src/com/redhat/rhn/manager/kickstart/KickstartPrePostCommand.java | 191 --------
java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java | 28 -
java/code/src/com/redhat/rhn/manager/system/SystemManager.java | 9
java/code/src/com/redhat/rhn/manager/user/UserManager.java | 32 -
java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java | 33 -
java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java | 2
java/code/src/org/cobbler/CobblerObject.java | 2
java/code/webapp/WEB-INF/struts-config.xml | 11
java/spacewalk-java.spec | 74 +++
rel-eng/packages/spacewalk-java | 2
schema/spacewalk/common/data/rhnUserGroupType.sql | 18
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-rhnUserGroupType_data.sql | 3
87 files changed, 95 insertions(+), 3060 deletions(-)
New commits:
commit 6f9d17a8e7941c6c24aaa36350f23dedc1ca3a51
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 19:06:31 2012 +0100
Automatic commit of package [spacewalk-java] release [1.7.49-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 52f4095..cc1cf61 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -17,7 +17,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.7.48
+Version: 1.7.49
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -585,6 +585,78 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Wed Feb 29 2012 Tomas Lestach <tlestach(a)redhat.com> 1.7.49-1
+- remove unused method and appropriate query (tlestach(a)redhat.com)
+- remove unused method and appropriate query (tlestach(a)redhat.com)
+- remove unused method and appropriate query (tlestach(a)redhat.com)
+- remove unused methods (tlestach(a)redhat.com)
+- remove unused methods (tlestach(a)redhat.com)
+- remove unused methods (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused methods and appropriate hbm queries (tlestach(a)redhat.com)
+- remove unused methods (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- deleting rhnDownloads and rhnChannelDownloads related java code
+ (tlestach(a)redhat.com)
+- remove unused methods and appropriate queries (tlestach(a)redhat.com)
+- remove unused methods (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused methods and appropriate hbm query (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused methods with appropriate queries (tlestach(a)redhat.com)
+- remove unused methods (tlestach(a)redhat.com)
+- remove unused method and appropriate sql-query (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused method and appropriate sql-query (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused methods (tlestach(a)redhat.com)
+- remove unused methods (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused method (tlestach(a)redhat.com)
+- remove unused public static final attributes (tlestach(a)redhat.com)
+- remove unused public static final attribute and appropriate queries
+ (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove unused public static final attributes (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove whole KickstartQueries (tlestach(a)redhat.com)
+- remove unused public static final attributes (tlestach(a)redhat.com)
+- remove unused public static final attributes (tlestach(a)redhat.com)
+- remove unused public static final attributes (tlestach(a)redhat.com)
+- remove unused public static final attributes (tlestach(a)redhat.com)
+- remove unused protected static final attribute (tlestach(a)redhat.com)
+- remove unused public static final attribute (tlestach(a)redhat.com)
+- remove unused protected static final attribute (tlestach(a)redhat.com)
+- remove unused protected static final attributes (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+- removing dead code (tlestach(a)redhat.com)
+
* Tue Feb 28 2012 Tomas Lestach <tlestach(a)redhat.com> 1.7.48-1
- remove unnecessary else statements in
java/code/src/com/redhat/rhn/testing/TestUtils.java (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 9d82fef..f4b78d3 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.7.48-1 java/
+1.7.49-1 java/
commit 40e1ae33964dcf341a12edbc0ca74b668494c446
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:30:46 2012 +0100
remove unused method and appropriate query
+ removing one extra unused query
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
index dc059ee..abc68e8 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
@@ -434,14 +434,6 @@ ORDER BY UPPER(COALESCE(X.name, '(none)')), X.id
<elaborator name="system_search_results" />
</mode>
-<mode name="visible_to_user_from_sysid" class="com.redhat.rhn.frontend.dto.SystemSearchResult">
- <query name="available_to_user_from_sysid" />
- <elaborator name="system_overview" />
- <elaborator name="entitlements"/>
- <elaborator name="is_virtual_guest" />
- <elaborator name="is_virtual_host" />
-</mode>
-
<mode name="visible_to_user" class="com.redhat.rhn.frontend.dto.SystemOverview">
<query name="available_to_user" />
<elaborator name="system_overview" />
@@ -1054,17 +1046,6 @@ SELECT DISTINCT ST.element AS ID
WHERE USP.user_id = :user_id AND S.id IN (%s)
</query>
-<query name="available_to_user_from_sysid" params="user_id, sysid">
- SELECT DISTINCT S.id,
- S.name,
- (SELECT 1
- FROM rhnServerFeaturesView SFV
- WHERE SFV.server_id = S.id
- AND SFV.label = 'ftr_system_grouping') AS selectable
- FROM rhnServer S inner join rhnUserServerPerms USP on S.id = USP.server_id
- WHERE USP.user_id = :user_id AND S.id = :sysid
-</query>
-
<query name="available_to_user" params="user_id">
SELECT DISTINCT S.id,
S.name,
diff --git a/java/code/src/com/redhat/rhn/manager/user/UserManager.java b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
index bca9fac..1197f85 100644
--- a/java/code/src/com/redhat/rhn/manager/user/UserManager.java
+++ b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
@@ -787,38 +787,6 @@ public class UserManager extends BaseManager {
}
/**
- * Returns visible System as a DataResult<SystemSearchResult> Object
- * @param user the user we want
- * @param id the system id to flesh out
- * @return DataResult
- */
- public static DataResult visibleSystemAsDtoFromId(User user,
- Long id) {
-
- SelectMode m = ModeFactory.getMode("System_queries",
- "visible_to_user_from_sysid");
- Map params = new HashMap();
- params.put("user_id", user.getId());
- params.put("sysid", id);
- DataResult system = m.execute(params);
- system.elaborate();
- return system;
- }
-
- /**
- * Gets a list of systems visible to a user as maps
- * @param user The user in question
- * @return Returns a DataResult containing the results from
- * System_queries.xmlrpc_visible_to_user.
- */
- public static DataResult visibleSystemsAsMaps(User user) {
- SelectMode m = ModeFactory.getMode("System_queries", "xmlrpc_visible_to_user");
- Map params = new HashMap();
- params.put("user_id", user.getId());
- return m.execute(params);
- }
-
- /**
* Returns the users in the given set
* @param user The user
* @param label The name of the set
commit 075f496844276e5e601dd6d6908b7419a8c21bba
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:25:41 2012 +0100
remove unused method and appropriate query
diff --git a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java
index ba70fdc..e534158 100644
--- a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java
@@ -21,9 +21,6 @@ import com.redhat.rhn.domain.role.Role;
import org.apache.log4j.Logger;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* UserGroupFactory - the singleton class used to fetch and store
* com.redhat.rhn.domain.org.usergroup.UserGroup objects from the
@@ -74,17 +71,5 @@ public class UserGroupFactory extends HibernateFactory {
retval.setRole(role);
return retval;
}
-
- /**
- * Lookup a UserGroup by their id
- * @param id the id to search for
- * @return the UserGroup found
- */
- public static UserGroup lookupById(Long id) {
- Map params = new HashMap();
- params.put("id", id);
- return (UserGroup) singleton.lookupObjectByNamedQuery("UserGroup.findById", params);
- }
-
}
diff --git a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupImpl.hbm.xml b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupImpl.hbm.xml
index 62cacdb..4e7725d 100644
--- a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupImpl.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupImpl.hbm.xml
@@ -24,9 +24,6 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<many-to-one name="role" column="group_type"
class="com.redhat.rhn.domain.role.RoleImpl" not-null="true" />
</class>
- <query name="UserGroup.findById">
- <![CDATA[from com.redhat.rhn.domain.org.usergroup.UserGroupImpl as ug where ug.id = :id]]>
- </query>
</hibernate-mapping>
commit f4f24bfd7878b8d493fad07680b6050dece360aa
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:24:45 2012 +0100
remove unused method and appropriate query
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/User_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/User_queries.xml
index 9b69f56..dd0acfe 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/User_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/User_queries.xml
@@ -306,13 +306,4 @@ SELECT count(id) as user_count
</query>
</mode>
-<mode name="get_user_id">
- <query params="loginUc">
-SELECT id as user_id
- FROM web_contact
- WHERE login_uc = :loginUc
- </query>
-</mode>
-
-
</datasource_modes>
diff --git a/java/code/src/com/redhat/rhn/domain/user/UserFactory.java b/java/code/src/com/redhat/rhn/domain/user/UserFactory.java
index cc20d7e..a859c1d 100644
--- a/java/code/src/com/redhat/rhn/domain/user/UserFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/user/UserFactory.java
@@ -288,25 +288,6 @@ public class UserFactory extends HibernateFactory {
return returnedUser;
}
-
- /**
- * Lookup an user id by their login - This is added as
- * the UserService API doesn't return an user id upon user creation
- * @param login the login to search by
- * @return the user id found
- */
- public static long getUserId(String login) {
- SelectMode m = ModeFactory.getMode("User_queries", "get_user_id");
- Map params = new HashMap();
- params.put(LOGIN_UC, login.toUpperCase());
- DataResult dr = m.execute(params);
-
- if (dr != null && dr.size() != 0) {
- return getLongValue(dr, USER_ID);
- }
- return -1;
- }
-
/**
* Gets a long value from the dataresult
* @param dr The DataResult object containing the output
commit edbdf57460a363b1be2c60f83708bdfb5849cdf8
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:21:02 2012 +0100
remove unused methods
diff --git a/java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java b/java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java
index dcfa884..b4d7d96 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java
@@ -71,20 +71,6 @@ public class TaskoFactory extends HibernateFactory {
}
/**
- * lookup template by bunch id and position
- * @param bunchId id of the bunch
- * @param order position
- * @return template
- */
- public static TaskoTemplate lookupTemplateByBunchAndOrder(Long bunchId, Long order) {
- Map params = new HashMap();
- params.put("bunch_id", bunchId);
- params.put("order", order);
- return (TaskoTemplate) singleton.lookupObjectByNamedQuery(
- "TaskoTemplate.lookupByBunchAndOrder", params);
- }
-
- /**
* list all available organizational bunches
* @return list of bunches
*/
@@ -414,25 +400,6 @@ public class TaskoFactory extends HibernateFactory {
}
/**
- * lists organizational schedules by bunch
- * @param orgId organization id
- * @param bunch type of schedules
- * @return list of schedules
- */
- public static List<TaskoSchedule> listSchedulesByOrgAndBunch(Integer orgId,
- TaskoBunch bunch) {
- Map params = new HashMap();
- params.put("bunch_id", bunch.getId());
- if (orgId == null) {
- return singleton.listObjectsByNamedQuery(
- "TaskoSchedule.listInSatByBunch", params);
- }
- params.put("org_id", orgId);
- return singleton.listObjectsByNamedQuery(
- "TaskoSchedule.listByOrgAndBunch", params);
- }
-
- /**
* lists organizational schedules by name
* @param orgId organization id
* @param jobLabel unique job name
commit 173d972a7e2055bc2832be4e1d532776ddb85ea4
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:20:13 2012 +0100
remove unused methods
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchSetupAction.java
index c47215a..5c5db0c 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemSearchSetupAction.java
@@ -420,11 +420,6 @@ public class SystemSearchSetupAction extends RhnAction implements Listable {
}
/** {@inheritDoc} */
- public String getDecl(RequestContext context) {
- return RhnSetDecl.SYSTEMS.getLabel();
- }
-
- /** {@inheritDoc} */
public List getResult(RequestContext context) {
String searchString = context.getParam(SEARCH_STRING, false);
@@ -435,10 +430,4 @@ public class SystemSearchSetupAction extends RhnAction implements Listable {
log.info("SystemSearchSetupAction.getResult() returning Collections.EMPTY_LIST");
return Collections.EMPTY_LIST;
}
-
- /** {@inheritDoc} */
- public String getParentUrl(RequestContext context) {
- return context.getRequest().getRequestURI();
- }
-
}
commit 20f5d12c938b89469c3058dfd268715dbf9fa24d
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:19:06 2012 +0100
remove unused methods
diff --git a/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java b/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java
index eeef03a..6f48e78 100644
--- a/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java
@@ -18,13 +18,8 @@ import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.domain.org.Org;
import org.apache.log4j.Logger;
-import org.hibernate.Criteria;
-import org.hibernate.HibernateException;
import org.hibernate.Session;
-import org.hibernate.criterion.CriteriaSpecification;
-import org.hibernate.criterion.Order;
-import java.util.Collections;
import java.util.Date;
import java.util.List;
@@ -68,33 +63,6 @@ public class TaskFactory extends HibernateFactory {
}
/**
- * list All tasks with the given name
- * @param name the name of the task
- * @return List of tasks
- */
- public static List<Task> listTasks(String name) {
- Session session = null;
- try {
- session = HibernateFactory.getSession();
- return session.getNamedQuery("Task.listTasksByName")
- .setString("name", name).list();
- }
- catch (HibernateException he) {
- log.error("Hibernate exception: " + he.toString());
- }
- return Collections.EMPTY_LIST;
- }
-
- /**
- * Remove a task from teh database
- * @param task the task to remove
- */
- public static void removeTask(Task task) {
- TaskFactory.getSession().delete(task);
- }
-
-
- /**
* Saves the object to the db
* @param taskIn The task to save
*/
@@ -141,30 +109,7 @@ public class TaskFactory extends HibernateFactory {
.list();
}
- /**
- * Returns a list of tasks ordered by earliest date. This could return
- * many records use cautiously.
- * @param distinct return distinct records.
- * @param maxresults Number of rows to return or TaskFactory.NO_MAXIMUM
- * @return list of tasks ordered by earliest date.
- */
- public static List getTaskList(boolean distinct, int maxresults) {
- Session session = HibernateFactory.getSession();
-
- Criteria c = session.createCriteria(Task.class);
- c.setCacheable(false); // don't want to cache all this
- c.addOrder(Order.asc("earliest"));
-
- if (maxresults != TaskFactory.NO_MAXIMUM) {
- c.setMaxResults(maxresults);
- }
- if (distinct) {
- c.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);
- }
-
- return c.list();
- }
/**
* Lookup a list of Tasks who's name start with passed in param
commit 1683a1fb4e7e0e33299604ce59bfd8b6b0f6ac75
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:16:38 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/PackageSearchHelper.java b/java/code/src/com/redhat/rhn/frontend/action/channel/PackageSearchHelper.java
index 9edf5b9..3352694 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/PackageSearchHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/PackageSearchHelper.java
@@ -57,26 +57,6 @@ public class PackageSearchHelper {
* @param searchString search string
* @param mode mode as in name only, name description, name and summary, free form
* @param selectedArches list of archs
- * @param fineGrained fine grained search
- * @return List of PackageOverview objects
- * @throws XmlRpcFault bad communication with search server
- * @throws MalformedURLException possibly bad configuration for search server address
- * @throws SearchServerIndexException error executing query
- */
- public static List<PackageOverview> performSearch(Long sessionId, String searchString,
- String mode, String[] selectedArches, Boolean fineGrained)
- throws XmlRpcFault, MalformedURLException, SearchServerIndexException {
- return performSearch(sessionId, searchString, mode, selectedArches, true,
- fineGrained);
- }
-
- /**
- * Will form a search request and send message to search server
- *
- * @param sessionId session id
- * @param searchString search string
- * @param mode mode as in name only, name description, name and summary, free form
- * @param selectedArches list of archs
* @param relevantFlag if set will force packages returned to be relevant to
* subscribed channels
* @param fineGrained fine grained search
commit f9cf798c4c6b03ff4fa81fa421ba7e92a2ca44cd
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:15:45 2012 +0100
remove unused methods and appropriate hbm queries
diff --git a/java/code/src/com/redhat/rhn/domain/common/ArchType.hbm.xml b/java/code/src/com/redhat/rhn/domain/common/ArchType.hbm.xml
index c97b545..8321213 100644
--- a/java/code/src/com/redhat/rhn/domain/common/ArchType.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/common/ArchType.hbm.xml
@@ -19,7 +19,4 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<query name="ArchType.findById">
<![CDATA[from com.redhat.rhn.domain.common.ArchType as t where t.id = :id]]>
</query>
- <query name="ArchType.findByLabel">
- <![CDATA[from com.redhat.rhn.domain.common.ArchType as t where t.label = :label]]>
- </query>
</hibernate-mapping>
diff --git a/java/code/src/com/redhat/rhn/domain/rhnpackage/PackageFactory.java b/java/code/src/com/redhat/rhn/domain/rhnpackage/PackageFactory.java
index 31b9dc6..09df312 100644
--- a/java/code/src/com/redhat/rhn/domain/rhnpackage/PackageFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/rhnpackage/PackageFactory.java
@@ -18,7 +18,6 @@ import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.db.datasource.ModeFactory;
import com.redhat.rhn.common.db.datasource.SelectMode;
import com.redhat.rhn.common.hibernate.HibernateFactory;
-import com.redhat.rhn.domain.common.ArchType;
import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.server.InstalledPackage;
import com.redhat.rhn.domain.server.Server;
@@ -148,18 +147,6 @@ public class PackageFactory extends HibernateFactory {
}
/**
- * Lookup a PackageArchType by its label.
- * @param label arch type label sought.
- * @return the ArchType whose label matches the given label.
- */
- public static ArchType lookupArchTypeByLabel(String label) {
- Map params = new HashMap();
- params.put("label", label);
- return (ArchType) singleton.lookupObjectByNamedQuery("ArchType.findByLabel",
- params, true);
- }
-
- /**
* Lookup a PackageArch by its label.
* @param label package arch label sought.
* @return the PackageArch whose label matches the given label.
@@ -286,18 +273,6 @@ public class PackageFactory extends HibernateFactory {
}
/**
- * Lookup packages that are located in the set 'packages_to_add'
- * @param user the user to lookup for
- * @return List of Package objects
- */
- public static List<Package> lookupPackagesFromSet(User user) {
-
- Map params = new HashMap();
- params.put("uid", user.getId());
- return singleton.listObjectsByNamedQuery("Package.lookupFromSet", params);
-
- }
- /**
* Returns PackageOverviews from a search.
* @param pids List of package ids returned from search server.
* @param archLabels List of channel arch labels.
diff --git a/java/code/src/com/redhat/rhn/domain/rhnpackage/Package_satellite.hbm.xml b/java/code/src/com/redhat/rhn/domain/rhnpackage/Package_satellite.hbm.xml
index 0dce555..424ef90 100644
--- a/java/code/src/com/redhat/rhn/domain/rhnpackage/Package_satellite.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/rhnpackage/Package_satellite.hbm.xml
@@ -240,17 +240,4 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
]]>
</query>
- <sql-query name="Package.lookupFromSet">
- <![CDATA[SELECT {p.*}
- from rhnPackage p
- left join rhnSolarisPatchSet P_2_ on p.id = P_2_.package_id
- left join rhnSolarisPatch P_1_ on p.id = P_1_.package_id
- inner join rhnSet S on p.id = s.element
- where S.label = 'packages_to_add'
- and S.user_id = :uid
- ]]>
- <return alias="p" class="com.redhat.rhn.domain.rhnpackage.Package" />
- </sql-query>
-
-
</hibernate-mapping>
commit 9086187995d4bfbf2e0ce319a9e638f08ea1b0f4
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:13:46 2012 +0100
remove unused methods
diff --git a/java/code/src/com/redhat/rhn/domain/org/OrgFactory.java b/java/code/src/com/redhat/rhn/domain/org/OrgFactory.java
index 39074db..65e1708 100644
--- a/java/code/src/com/redhat/rhn/domain/org/OrgFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/org/OrgFactory.java
@@ -22,7 +22,6 @@ import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.domain.channel.ChannelFamily;
import com.redhat.rhn.domain.role.RoleFactory;
-import com.redhat.rhn.domain.server.ServerGroup;
import org.apache.log4j.Logger;
import org.hibernate.Session;
@@ -98,21 +97,6 @@ public class OrgFactory extends HibernateFactory {
}
/**
- * Retrieves a specific group from the server groups for this org
- * @param id The id of the group we're looking for
- * @param org The org in which the server group belongs
- * @return Returns the server group if found, null otherwise
- */
- protected static ServerGroup getServerGroup(Long id, Org org) {
- Session session = null;
- session = HibernateFactory.getSession();
- return (ServerGroup) session.getNamedQuery("ServerGroup.lookupByIdAndOrg")
- .setLong("id", id.longValue())
- .setEntity("org", org)
- .uniqueResult();
- }
-
- /**
* Get the CustomDataKey represented by the passed in label and org
* @param label The label of the key you want
* @param org The org the key is in
@@ -487,19 +471,6 @@ public class OrgFactory extends HibernateFactory {
}
/**
- * @param orgIn Org to caclulate system migrations to
- * @return number of systems migrated to orgIn
- */
- public static Long getSysMigrationsTo(Long orgIn) {
- Map<String, Object> params = new HashMap<String, Object>();
- params.put("org_id", orgIn);
- Long systems = (Long)singleton.lookupObjectByNamedQuery(
- "Org.getSysMigrationTo", params);
- return systems;
- }
-
-
- /**
* Lookup all orgs on the satellite.
* @return List of orgs.
*/
commit 3fb598fa80d8a595cd2c55a7e89bb4c0dfe91f65
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:11:08 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartVariableAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartVariableAction.java
index ea97fd9..d77b871 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartVariableAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartVariableAction.java
@@ -128,11 +128,6 @@ public abstract class KickstartVariableAction extends RhnAction {
}
}
- protected String getSuccessKey() {
- return "kickstart.details.success";
- }
-
-
/**
*
* @param context
commit 03079b5dd6b3ddee8c5349e25a835c7d0a562cce
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:09:42 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index e93b4f4..d917146 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -982,32 +982,6 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
}
/**
- * Get the tools Channel for a KickstartData object and server
- * @param ksdata to fetch tools channel for
- * @param user who is looking up the channel
- * @param server to check against
- * @return Channel if found
- */
- public static Channel getToolsChannel(KickstartData ksdata, User user, Server server) {
-
- if (server != null && ksdata.getChannel().getId().
- equals(server.getBaseChannel().getId())) {
- log.debug(" ** getToolsChannel() returning ksdata's channel");
- return ksdata.getChannel();
- }
- log.debug(" ** getToolsChannel() looking for tools channel as a child");
- Channel kschannel = ksdata.getChannel();
- Channel toolsChannel = ChannelManager.getToolsChannel(kschannel, user);
- if (toolsChannel != null) {
- return toolsChannel;
- }
- log.error("Tools channel not found! " +
- "This means we can't find the rhn-kickstart package.");
- return null;
-
- }
-
- /**
* Cancel existing kickstart sessions on the host server for the system to be
* kickstarted (the target server).
*/
commit 50588547d5fac02d78fcab833ee9e2d84f78802f
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 18:08:47 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartHelper.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartHelper.java
index ab69cf2..640c438 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartHelper.java
@@ -327,33 +327,6 @@ public class KickstartHelper {
}
/**
- * Generates a URL suitable for downloading things related to a specific
- * kickstart session.
- * @param org The Org to generate the ks url for.
- * @param function The function that will be appended to the returned
- * kickstart url.
- * @return A string suitable for downloading kickstart-related things.
- */
- public String generateKickstartUrl(Org org, String function) {
- String protocol = getKickstartProtocol();
- String hostname = getKickstartHost();
-
- String orgToken = generateOrgToken(org);
-
- String url =
- protocol +
- "://" +
- hostname +
- "/kickstart/ks/org/" +
- orgToken +
- "/" +
- function +
- "/";
-
- return url;
- }
-
- /**
* Verify that the kickstart channel is valid.
* Valid kickstart channels must have a set list of packages described
* by KickstartFormatter.UPDATE_PKG_NAMES and KickstartFormatter.FRESH_PKG_NAMES_RHEL34
commit 04a5cd1ad73284eca3c63c6a179f87908396bc74
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:55:58 2012 +0100
deleting rhnDownloads and rhnChannelDownloads related java code
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
index 304d098..79408ce 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
@@ -172,79 +172,6 @@ ORDER BY C.parent_channel NULLS LAST, UPPER(C.name)
</query>
</mode>
-
-<mode name="channel_downloads_by_type" class="com.redhat.rhn.frontend.dto.ISOImage">
- <query params="channel_label, download_type, org_id" >
-SELECT RD.name AS DOWNLOAD_NAME,
- RF.path AS DOWNLOAD_PATH,
- CS.checksum AS DOWNLOAD_CHECKSUM,
- RF.file_size AS DOWNLOAD_SIZE,
- RF.id AS FILE_ID,
- RF.id AS ID, -- for datasource, needs ID for elaborator
- RD.category AS CATEGORY
- FROM rhnFile RF,
- rhnDownloads RD,
- rhnDownloadType DT,
- rhnAvailableChannels AC,
- rhnChannelDownloads CD,
- rhnChannel C,
- rhnChecksum CS
- WHERE AC.org_id = :org_id
- AND RD.id = CD.downloads_id
- AND CD.channel_id = C.id
- AND C.label = :channel_label
- AND C.id = AC.channel_id
- AND DT.id = RD.download_type
- AND DT.label = :download_type
- AND RF.id = RD.file_id
- AND RF.checksum_id = CS.id
-ORDER BY RD.ordering
- </query>
- <elaborator multiple="t">
-SELECT FL.file_id id, FL.location LOCATIONS
- FROM rhnFileLocation FL
- WHERE FL.file_id in (%s)
- </elaborator>
-</mode>
-
-
-<mode name="satellite_channel_downloads_by_type" class="com.redhat.rhn.frontend.dto.ISOImage">
- <query params="org_id, channel_label, download_type">
-SELECT DISTINCT RF.id AS ID,
- RD.name AS DOWNLOAD_NAME,
- RF.path AS DOWNLOAD_PATH,
- CS.checksum AS DOWNLOAD_CHECKSUM,
- RF.file_size AS DOWNLOAD_SIZE,
- RF.id AS FILE_ID,
- RD.category AS CATEGORY,
- RD.ordering AS ORDERING
- FROM rhnFile RF,
- rhnDownloads RD,
- rhnDownloadType DT,
- rhnChannelDownloads CD,
- rhnAvailableChannels AC,
- rhnChannel C,
- rhnChecksum CS
- WHERE AC.org_id = :org_id
- AND C.id = AC.channel_id
- AND C.label = :channel_label
- AND CD.channel_id = C.id
- AND RD.id = CD.downloads_id
- AND DT.id = RD.download_type
- AND DT.label = :download_type
- AND RF.id = RD.file_id
- AND RF.checksum_id = CS.id
-ORDER BY RD.ordering
- </query>
- <elaborator multiple="t">
-SELECT FL.file_id id, L.label LOCATIONS
- FROM rhnFileLocation FL,
- rhnLocation L
- WHERE l.id = FL.location_id
- AND FL.file_id in (%s)
- </elaborator>
-</mode>
-
<mode name="user_subscribe_perms" class="com.redhat.rhn.frontend.dto.ChannelPerms">
<query params="user_id, org_id">
SELECT AC.channel_id AS ID,
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/ChannelAclHandler.java b/java/code/src/com/redhat/rhn/common/security/acl/ChannelAclHandler.java
index 354a41c..8a52617 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/ChannelAclHandler.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/ChannelAclHandler.java
@@ -14,7 +14,6 @@
*/
package com.redhat.rhn.common.security.acl;
-import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.channel.ChannelFactory;
import com.redhat.rhn.domain.channel.ChannelVersion;
@@ -174,24 +173,6 @@ public class ChannelAclHandler extends BaseHandler {
}
/**
- * Does the channel have anything to download?
- * @param ctx request context (user,cid)
- * @param params check parameters
- * @return true if allowed, false else
- */
- public boolean aclChannelHasDownloads(Object ctx, String[] params) {
- HashMap ctxMap = (HashMap)ctx;
- User usr = (User)ctxMap.get(USER);
- Channel chan = getChannel(usr, ctxMap);
- if (chan != null) {
- DataResult dr = ChannelManager.
- listDownloadImages(usr, chan.getLabel(), "iso", null, chan.isSatellite());
- return (dr == null ? false : (dr.size() > 0));
- }
- return false;
- }
-
- /**
* Is this a RHEL5 channel?
* @param ctx request context (user,cid)
* @param params check parameters
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/ISODownloadAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/ISODownloadAction.java
deleted file mode 100644
index 284014f..0000000
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/ISODownloadAction.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.action.channel;
-
-import com.redhat.rhn.common.db.datasource.DataResult;
-import com.redhat.rhn.domain.channel.Channel;
-import com.redhat.rhn.domain.channel.ChannelFactory;
-import com.redhat.rhn.domain.user.User;
-import com.redhat.rhn.frontend.dto.ISOImage;
-import com.redhat.rhn.frontend.dto.ISOSet;
-import com.redhat.rhn.frontend.struts.RequestContext;
-import com.redhat.rhn.frontend.struts.RhnUnpagedListAction;
-import com.redhat.rhn.manager.channel.ChannelManager;
-
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionForward;
-import org.apache.struts.action.ActionMapping;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * ISODownloadAction - handle events related to choosing an ISO to download
- * @version $Rev$
- */
-public class ISODownloadAction extends RhnUnpagedListAction {
-
- public static final String CHANNEL_ID = "cid";
- public static final String IMAGE_TYPE = "iso";
- public static final String CHANNEL_NAME = "channel";
- public static final String LATEST = "latest";
- public static final String SET_LIST = "setList";
-
- public static final String BASE_CHANNEL_CONTENT = "baseContent";
- public static final String INCR_CHANNEL_CONTENT = "incrContent";
-
- private static final String CHANNEL_DUMP_TYPE = "channel-xml-dump";
- private static final String BASE = "(Base";
- private static final String INCR = "(Incremental";
-
- /**
- * {@inheritDoc}
- */
- public ActionForward execute(ActionMapping mapping, ActionForm form,
- HttpServletRequest request, HttpServletResponse response) {
-
- RequestContext requestContext = new RequestContext(request);
- User user = requestContext.getLoggedInUser();
- DataResult dr = null;
- Long cid = requestContext.getParamAsLong(CHANNEL_ID);
- Channel ch = ChannelFactory.lookupByIdAndUser(cid, user);
- request.setAttribute(CHANNEL_NAME, ch);
-
- if (ch != null) {
- dr = ChannelManager.listDownloadImages(user, ch.getLabel(), IMAGE_TYPE, null,
- false);
- List sets = findISOSets(request, user, dr, false);
- request.setAttribute(SET_LIST, sets);
-
- dr = ChannelManager.listDownloadImages(user, ch.getLabel(), CHANNEL_DUMP_TYPE,
- null, true);
- if (dr != null && dr.size() > 0) {
- sets = findISOSets(request, user, dr, true);
- separateContent(request, sets);
- }
- }
- return mapping.findForward("default");
- }
-
- /*
- * Breaks content-ISOs into Base and Incremental, by category
- */
- protected void separateContent(HttpServletRequest request, List sets) {
- List bases = new ArrayList();
- List incrementals = new ArrayList();
- for (Iterator itr = sets.iterator(); itr.hasNext();) {
- ISOSet aSet = (ISOSet) itr.next();
- if (aSet.getCategory().indexOf(BASE) >= 0) {
- bases.add(aSet);
- }
- else if (aSet.getCategory().indexOf(INCR) >= 0) {
- incrementals.add(aSet);
- }
- }
- request.setAttribute(BASE_CHANNEL_CONTENT, bases);
- request.setAttribute(INCR_CHANNEL_CONTENT, incrementals);
- }
-
- /*
- * Breaks download-ISOs into latest, binary, and source downloads
- */
- protected List findISOSets(HttpServletRequest request, User user, DataResult dr,
- boolean isSat) {
- List prevSets = new ArrayList(); // ISOSet
- Map categories = new HashMap(); // category, ISOSet
-
- if (dr != null && dr.size() > 0) {
- int startingImg = 0;
- // Set up first/latest set, if we're not satellite-content
- // (For content, we don't make this distinction, so skip this step)
- if (!isSat) {
- ISOImage latest = (ISOImage) dr.get(startingImg++);
- latest.createDownloadUrl(user);
- ISOSet latestSet = new ISOSet();
- latestSet.add(latest);
- categories.put(latest.getCategory(), latestSet);
- request.setAttribute(LATEST, latestSet);
- }
-
- // Handle all remaining images
- for (int i = startingImg; i < dr.getTotalSize(); i++) {
- ISOImage img = (ISOImage) dr.get(i);
- img.createDownloadUrl(user);
- ISOSet theSet = (ISOSet) categories.get(img.getCategory());
- if (theSet == null) {
- theSet = new ISOSet();
- prevSets.add(theSet);
- categories.put(img.getCategory(), theSet);
- }
- theSet.add(img);
- }
- }
- return prevSets;
- }
-}
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/ISOImage.java b/java/code/src/com/redhat/rhn/frontend/dto/ISOImage.java
deleted file mode 100644
index 15bae80..0000000
--- a/java/code/src/com/redhat/rhn/frontend/dto/ISOImage.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.dto;
-
-import com.redhat.rhn.common.conf.Config;
-import com.redhat.rhn.common.util.StringUtil;
-import com.redhat.rhn.domain.user.User;
-import com.redhat.rhn.manager.download.DownloadManager;
-
-import java.io.File;
-
-/**
- * ISOImage
- * @version $Rev$
- */
-public class ISOImage extends BaseDto {
- private String downloadName;
- private String downloadPath;
- private String downloadChecksum;
- private Long downloadSize;
- private Long fileId;
- private Long id;
- private Long ordering;
- private String category;
- private String url;
-
- /**
- * {@inheritDoc}
- */
- public Long getId() {
- return id;
- }
-
- /**
- * Set new id
- * @param newId id to set
- */
- public void setId(Long newId) {
- id = newId;
- }
-
- /**
- * getter for ISO category
- * @return category
- */
- public String getCategory() {
- return category;
- }
-
- /**
- * Set category
- * @param cat category to set
- */
- public void setCategory(String cat) {
- category = cat;
- }
-
- /**
- * getter for ISO checksum
- * @return cksum
- */
- public String getDownloadChecksum() {
- return downloadChecksum;
- }
-
- /**
- * Set checksum
- * @param dlSum checksum to set
- */
- public void setDownloadChecksum(String dlSum) {
- downloadChecksum = dlSum;
- }
-
- /**
- * getter for ISO name
- * @return name
- */
- public String getDownloadName() {
- return downloadName;
- }
-
- /**
- * Set name
- * @param dlName name to set
- */
- public void setDownloadName(String dlName) {
- downloadName = dlName;
- }
-
- /**
- * getter for ISO file-path
- * @return path
- */
- public String getDownloadPath() {
- return downloadPath;
- }
-
- /**
- * Set path
- * @param dlPath new path
- */
- public void setDownloadPath(String dlPath) {
- downloadPath = dlPath;
- }
-
- /**
- * Human-readable string describing the image's filesize
- * @return filesize string
- */
- public String getSize() {
- return StringUtil.displayFileSize(downloadSize.longValue(), true);
- }
-
- /**
- * getter for ISO size in bytes
- * @return size
- */
- public Long getDownloadSize() {
- return downloadSize;
- }
-
- /**
- * Set size (bytes)
- * @param dlSz size to set
- */
- public void setDownloadSize(Long dlSz) {
- downloadSize = dlSz;
- }
-
- /**
- * getter for ISO file-id
- * @return DB fid
- */
- public Long getFileId() {
- return fileId;
- }
-
- /**
- * Set id of associated file
- * @param fid new fid
- */
- public void setFileId(Long fid) {
- fileId = fid;
- }
-
- /**
- * Given a user and a mount-point, create the appropriate download-url for this
- * ISO image
- * @param u User requesting the download
- */
- public void createDownloadUrl(User u) {
- setUrl(DownloadManager.getISODownloadPath(this, u));
- }
-
- /**
- * Set the fully-qualified download-URL for this ISO image
- * @param newUrl complete URL for this image's download
- */
- public void setUrl(String newUrl) {
- url = newUrl;
- }
-
- /**
- * Get the fully-qualified download-URL for this ISO image
- * @return url
- */
- public String getUrl() {
- return url;
- }
-
- /**
- * Returns true if this image is accessible from this machine
- * @return true if we can find web.mount_point/download/<path>, false else
- */
- public boolean getExists() {
- String mtpt = Config.get().getString("web.mount_point");
- File f = new File(mtpt + "/download/" + getDownloadPath());
- return f.exists();
- }
-
- protected long getExpires() {
- int lifetime = Config.get().getInt("web.download_url_lifetime");
- // SECONDS! *NOT* milliseconds
- return (System.currentTimeMillis() / 1000 + lifetime);
- }
-
- //return RHN::SessionSwap->rhn_hmac_data($self->{expires}, $self->{user_id},
- // $self->{file_id} || 0, $self->{path_trail});
- protected String getToken(User u, long expires) {
- return DownloadManager.getFileSHA1Token(this.getId(), this.getDownloadName(),
- u, expires, DownloadManager.DOWNLOAD_TYPE_ISO);
- }
-
- /**
- * Extracts the base filename of an ISO from its download path
- * @return base name (e.g., "RHEL5-Server-20060830.1-i386-disc4-ftp.iso")
- */
- public String getBaseISOName() {
- int lastSlash = getDownloadPath().lastIndexOf('/');
- return getDownloadPath().substring(lastSlash + 1);
- }
-
- /**
- * get the ISO-ordering information
- * @return ordinal for this ISO within its group
- */
- public Long getOrdering() {
- return ordering;
- }
-
- /**
- * Set the order of this ISO in its grouping
- * @param ordr new ordering
- */
- public void setOrdering(Long ordr) {
- ordering = ordr;
- }
-}
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/ISOSet.java b/java/code/src/com/redhat/rhn/frontend/dto/ISOSet.java
deleted file mode 100644
index c6d1964..0000000
--- a/java/code/src/com/redhat/rhn/frontend/dto/ISOSet.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.dto;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * ISOSet - structure for holding info about all ISOs for a given entity
- * This is used for two kinds of ISOs, installation-ISOs and Spacewalk Content ISOs.
- * Installation ISOs can be divided into binary and source ISOs. Content ISOs can
- * be divided into Base and Incremental. The division is done heuristically, based on
- * three rules: 1) if "-source-" appears in the download--path, this must be a source ISO
- * else it is binary; 2) If "(Base" appears in the category this is a Base content ISO;
- * 3) If "(Incremental" appears in the category this is an Incremental Content ISO.
- *
- * A given ISOSet will be either src/binary OR base/incr, never both. This code takes
- * advantage of that context, knowing that the caller will "know" what kind of ISOSet
- * they're dealing with.
- *
- * If any of these assumptions changes, this code will break. Ultimately, it would be
- * optimal if the DB content flagged ISOImages as one kind or another.
- *
- * @version $Rev$
- */
-public class ISOSet {
-
- private static final String SRC = "-source-";
-
- private List binaries = new ArrayList();
- private List sources = new ArrayList();
- private String category = null;
-
- /**
- * get dl category all images in set belong to
- * @return category name
- */
- public String getCategory() {
- return category;
- }
-
- /**
- * Get List<ISOImage> of the non-source-discs in this set
- * @return List<ISOImage>
- */
- public List getBinaries() {
- return binaries;
- }
-
- /**
- * Set the List that contains the binary-discs for this Set
- * @param newBin new binaries-list
- */
- public void setBinaries(List newBin) {
- binaries = newBin;
- }
-
- /**
- * Get List<ISOImage> of all images whose path contains "-source-"
- * @return List<ISOImage> of source imgs
- */
- public List getSources() {
- return sources;
- }
-
- /**
- * Set the List that contains the source-discs for this Set
- * @param newSrcs new source-list
- */
- public void setSources(List newSrcs) {
- sources = newSrcs;
- }
-
- /**
- * Add a new image to the "right" (binaries or source) list
- * @param img ISOImage to add to a list
- * @throws Error if the image belons to a different Category than the one the Set
- * defines
- */
- public void add(ISOImage img) {
- if (getCategory() == null) {
- category = img.getCategory();
- }
- else if (!getCategory().equals(img.getCategory())) {
- throw new Error("NEW IMG DOESN'T MATCH THE SET!!");
- }
-
- if (img.getDownloadPath().indexOf(SRC) >= 0) {
- getSources().add(img);
- }
- else {
- getBinaries().add(img);
- }
- }
-}
diff --git a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
index 5620f56..e997291 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
@@ -1831,41 +1831,6 @@ public class ChannelManager extends BaseManager {
}
/**
- * Return a list of all downlaods available for download from the specified channel
- * @param u User making the request
- * @param channelLabel label of channel of interest
- * @param downloadType type of download requested (typically "iso")
- * @param lc associated list-control
- * @param forSatellite true if we want satellite-related downloads
- * @return DataResult<ISOImage>
- */
- public static DataResult listDownloadImages(
- User u,
- String channelLabel, String downloadType, ListControl lc,
- boolean forSatellite) {
- SelectMode m = null;
-
- if (forSatellite) {
- m = ModeFactory.getMode("Channel_queries",
- "satellite_channel_downloads_by_type");
- }
- else {
- m = ModeFactory.getMode("Channel_queries",
- "channel_downloads_by_type");
- }
-
- Map params = new HashMap();
- params.put("org_id", u.getOrg().getId());
- params.put("channel_label", channelLabel);
- params.put("download_type", downloadType);
- DataResult dr = makeDataResult(params, params, lc, m);
- if (dr.size() == 0) {
- return null;
- }
- return dr;
- }
-
- /**
* Search for the tools channel beneath the specified base channel.
* Queries for package names that look like kickstart packages, and
* assumes that if any are found in this channel is must be the
diff --git a/java/code/src/com/redhat/rhn/manager/download/DownloadManager.java b/java/code/src/com/redhat/rhn/manager/download/DownloadManager.java
index c860480..716abe7 100644
--- a/java/code/src/com/redhat/rhn/manager/download/DownloadManager.java
+++ b/java/code/src/com/redhat/rhn/manager/download/DownloadManager.java
@@ -14,11 +14,6 @@
*/
package com.redhat.rhn.manager.download;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.conf.ConfigDefaults;
import com.redhat.rhn.common.security.SessionSwap;
@@ -28,9 +23,13 @@ import com.redhat.rhn.domain.rhnpackage.PackageSource;
import com.redhat.rhn.domain.rhnpackage.Patch;
import com.redhat.rhn.domain.rhnpackage.PatchSet;
import com.redhat.rhn.domain.user.User;
-import com.redhat.rhn.frontend.dto.ISOImage;
import com.redhat.rhn.manager.BaseManager;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+
/**
* Provides methods for downloading packages and files and getting urls
* DownloadManager
@@ -42,7 +41,6 @@ public class DownloadManager extends BaseManager {
public static final String DOWNLOAD_TYPE_COBBLER = "cobbler";
public static final String DOWNLOAD_TYPE_PACKAGE = "package";
public static final String DOWNLOAD_TYPE_SOURCE = "srpm";
- public static final String DOWNLOAD_TYPE_ISO = "iso";
public static final String DOWNLOAD_TYPE_PATCH_README = "patchreadme";
public static final String DOWNLOAD_TYPE_PATCH_SET_README = "patchsetreadme";
public static final String DOWNLOAD_TYPE_REPO_LOG = "repolog";
@@ -111,19 +109,6 @@ public class DownloadManager extends BaseManager {
DownloadManager.DOWNLOAD_TYPE_REPO_LOG);
}
-
-
- /**
- * Get the an ISO download Path
- * @param image the Iso Image
- * @param user the user
- * @return the path to be used to download the iso
- */
- public static String getISODownloadPath(ISOImage image, User user) {
- return getDownloadPath(image.getFileId(), image.getDownloadName(), user,
- DownloadManager.DOWNLOAD_TYPE_PACKAGE);
- }
-
/**
* Get the patch readme download url/path
* @param patch the patch
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 8811ae2..a6d7560 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -6941,17 +6941,6 @@
</action>
<!-- ===== END CONFIGURATION ===== -->
- <!-- ===== START ISO DOWNLOAD ===== -->
- <action path="/software/channel/downloads/Download"
- scope="request"
- input="/WEB-INF/pages/software/downloads/download.jsp"
- type="com.redhat.rhn.frontend.action.channel.ISODownloadAction"
- className="com.redhat.rhn.frontend.struts.RhnActionMapping">
- <forward name="default" path="/WEB-INF/pages/software/downloads/download.jsp"/>
- </action>
-
- <!-- ===== END ISO DOWNLOAD ===== -->
-
<action path="/systems/entitlements/GuestLimitedHosts"
scope="request"
type="com.redhat.rhn.frontend.action.systems.entitlements.VirtualizationEntitlementsAction"
commit f1f46839df41c302c03589a97db567bbe525f48d
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:39:30 2012 +0100
remove unused methods and appropriate queries
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
index 2b69be0..e3d892c 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
@@ -1111,18 +1111,6 @@ ORDER BY UPPER(EK.keyword)
</query>
</mode>
-<mode name="packageids_associated_to_errata"
- class="com.redhat.rhn.frontend.dto.ErrataPackageFile">
- <query params="channel_id">
- SELECT ep.package_id
- FROM rhnErrataPackage ep,
- rhnChannelPackage cp
- WHERE ep.package_id = cp.package_id
- AND cp.channel_id = :channel_id
- AND ep.errata_id in (%s)
- </query>
-</mode>
-
<mode name="available_to_org">
<query params="eid, org_id">
SELECT 1
diff --git a/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java b/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
index c3136c7..c590dcb 100644
--- a/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
@@ -112,27 +112,7 @@ public class ErrataFactory extends HibernateFactory {
return toReturn;
}
- /**
- * List the package ids that are associated with an errata
- * associated with given channel
- * @param channelId channel of interest
- * @param errataIds list of errata ids
- * @return List of package ids
- */
- public static List<Long> listErrataChannelPackages(Long channelId,
- Set<Long> errataIds) {
- SelectMode m = ModeFactory.getMode("Errata_queries",
- "packageids_associated_to_errata");
- Map params = new HashMap();
- params.put("channel_id", channelId);
- DataResult<ErrataPackageFile> dr = m.execute(params, new ArrayList(errataIds));
- // make the final list unique
- Set toReturn = new HashSet<Long>();
- for (ErrataPackageFile file : dr) {
- toReturn.add(file.getPackageId());
- }
- return new ArrayList(toReturn);
- }
+
/**
* Tries to locate errata based on either the errataum's id or the
@@ -546,18 +526,7 @@ public class ErrataFactory extends HibernateFactory {
return bug;
}
- /**
- * Creates a new Unpublished Errata file with given ErrataFileType, checksum, and name
- * @param ft ErrataFileType for the new ErrataFile
- * @param cs MD5 Checksum for the new Errata File
- * @param name name for the file
- * @return new Unpublished Errata File
- */
- public static ErrataFile createUnpublishedErrataFile(ErrataFileType ft,
- String cs,
- String name) {
- return createUnpublishedErrataFile(ft, cs, name, new HashSet());
- }
+
/**
* Creates a new Unpublished Errata file with given ErrataFileType, checksum, and name
@@ -705,30 +674,6 @@ public class ErrataFactory extends HibernateFactory {
}
/**
- * Lookup a Security Errata by the synopsis string
- * @param synopsis to search for
- * @return the Errata found
- */
- public static List lookupErratasBySynopsis(String synopsis) {
- Session session = null;
- List retval = null;
- try {
- session = HibernateFactory.getSession();
- retval = session.getNamedQuery("PublishedErrata.findSecurityBySynopsis")
- .setString("type", ERRATA_TYPE_SECURITY)
- .setString("synopsis", synopsis)
- //Retrieve from cache if there
- .setCacheable(true).list();
- }
- catch (HibernateException he) {
- log.error("Error loading ActionArchTypes from DB", he);
- throw new
- HibernateRuntimeException("Error loading ActionArchTypes from db");
- }
- return retval;
- }
-
- /**
* Finds published errata by id
* @param id errata id
* @return Errata if found, otherwise null
@@ -1030,20 +975,7 @@ public class ErrataFactory extends HibernateFactory {
.list();
}
- /**
- * Lookup errata that are in the set "errata_list"
- * @param user the user to search the set for
- * @param set the set to look in
- * @return List of Errata
- */
- public static List<Errata> lookupErrataInSet(User user, String set) {
- Map params = new HashMap();
- params.put("uid", user.getId());
- params.put("set", set);
- return singleton.listObjectsByNamedQuery(
- "PublishedErrata.lookupFromSet", params);
- }
diff --git a/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml b/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
index 77fd9a8..43faa89 100644
--- a/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/errata/impl/PublishedErrata.hbm.xml
@@ -86,11 +86,6 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<![CDATA[from com.redhat.rhn.domain.errata.impl.PublishedErrata as e
where e.advisoryType = :type]]>
</query>
- <query name="PublishedErrata.findSecurityBySynopsis">
- <![CDATA[from com.redhat.rhn.domain.errata.impl.PublishedErrata as e
- where e.advisoryType = :type
- and substr(e.synopsis, 1, 1) = :synopsis]]>
- </query>
<query name="PublishedErrata.findById">
<![CDATA[from com.redhat.rhn.domain.errata.impl.PublishedErrata as e
where e.id = :id]]>
@@ -225,18 +220,4 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<return-scalar column="name" type="string" />
</sql-query>
-
- <sql-query name="PublishedErrata.lookupFromSet">
- <![CDATA[SELECT {e.*}
- from rhnErrata e left join
- rhnErrataCloned E_1_ on e.id = E_1_.id,
- rhnSet S
- where S.element = e.id
- and S.label = :set
- and S.user_id = :uid
- ]]>
- <return alias="e" class="com.redhat.rhn.domain.errata.impl.PublishedErrata" />
- </sql-query>
-
-
</hibernate-mapping>
commit d89ca08da23e257f88a2df13a1cdbdf17a724c42
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:36:43 2012 +0100
remove unused methods
diff --git a/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java b/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
index a5ab80b..b3a3070 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
@@ -35,7 +35,6 @@ import com.redhat.rhn.domain.errata.Bug;
import com.redhat.rhn.domain.errata.Errata;
import com.redhat.rhn.domain.errata.ErrataFactory;
import com.redhat.rhn.domain.errata.ErrataFile;
-import com.redhat.rhn.domain.errata.impl.PublishedClonedErrata;
import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.rhnset.RhnSet;
import com.redhat.rhn.domain.role.RoleFactory;
@@ -44,7 +43,6 @@ import com.redhat.rhn.frontend.dto.ChannelOverview;
import com.redhat.rhn.frontend.dto.ErrataOverview;
import com.redhat.rhn.frontend.dto.OwnedErrata;
import com.redhat.rhn.frontend.dto.PackageOverview;
-import com.redhat.rhn.frontend.events.CloneErrataAction;
import com.redhat.rhn.frontend.events.CloneErrataEvent;
import com.redhat.rhn.frontend.listview.PageControl;
import com.redhat.rhn.frontend.xmlrpc.InvalidErrataException;
@@ -60,7 +58,6 @@ import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import java.io.File;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
@@ -844,24 +841,7 @@ public class ErrataManager extends BaseManager {
return advTypes;
}
- /**
- * Returns a list of advisory types available for an errata
- * (exclusive to System Currency page)
- * @return advisory types
- */
- public static List<String> currencyAdvisoryTypes() {
- List<String> advTypes = new ArrayList<String>();
- LocalizationService ls = LocalizationService.getInstance();
- advTypes.add(ls.getMessage("errata.create.securityadvisory.crit",
- LocalizationService.DEFAULT_LOCALE));
- advTypes.add(ls.getMessage("errata.create.securityadvisory.imp",
- LocalizationService.DEFAULT_LOCALE));
- advTypes.add(ls.getMessage("errata.create.securityadvisory.mod",
- LocalizationService.DEFAULT_LOCALE));
- advTypes.add(ls.getMessage("errata.create.securityadvisory.low",
- LocalizationService.DEFAULT_LOCALE));
- return advTypes;
- }
+
/**
* Returns a list of l10n-ed advisory types available for an errata
@@ -957,16 +937,7 @@ public class ErrataManager extends BaseManager {
return makeDataResult(params, params, null, m);
}
- /**
- * Get a list of channels applicable to the erratum
- * @param eid The id of the erratum
- * @param orgid The id for the org we want to lookup against
- * @param pc The page control for the user
- * @return List of applicable channels for the erratum (that the org has access to)
- */
- public static DataResult applicableChannels(Long eid, Long orgid, PageControl pc) {
- return applicableChannels(eid, orgid, pc, null);
- }
+
/**
* Get a list of channels applicable to the erratum
@@ -1179,16 +1150,7 @@ public class ErrataManager extends BaseManager {
}
- /**
- * Finds the errata ids issued between start and end dates
- * @param start start date
- * @param end end date
- * @return errata ids issued between start -> end
- */
- public static List<Long> listErrataIdsIssuedBetween(Date start, Date end) {
- SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_PARSE_STRING);
- return listErrataIdsIssuedBetween(sdf.format(start), sdf.format(end));
- }
+
/**
* remove an erratum for a channel and updates the errata cache accordingly
@@ -1258,20 +1220,7 @@ public class ErrataManager extends BaseManager {
}
- /**
- * Publish errata to a channel asynchronisly (cloning as necessary),
- * does not do any package push
- * @param chan the channel
- * @param errataIds list of errata ids
- * @param user the user doing the push
- */
- public static void publishErrataToChannel(Channel chan,
- Collection<Long> errataIds, User user) {
- Logger.getLogger(ErrataManager.class).debug("Publishing");
- CloneErrataEvent eve = new CloneErrataEvent(chan, errataIds, user);
- CloneErrataAction event = new CloneErrataAction();
- event.doExecute(eve);
- }
+
/**
* Send errata notifications for a particular errata and channel
@@ -1362,33 +1311,6 @@ public class ErrataManager extends BaseManager {
return flag;
}
- /**
- * resync an errata, including all it's details
- * doesn't actually push any packages to a channel
- * @param cloned the cloned errata needing resyncing
- * @param user the user doign the syncing
- */
- public static void reSyncErrata(PublishedClonedErrata cloned, User user) {
- if (!user.hasRole(RoleFactory.CHANNEL_ADMIN)) {
- throw new PermissionException(RoleFactory.CHANNEL_ADMIN);
- }
- ErrataFactory.syncErrataDetails(cloned);
- }
-
- /**
- * Apply errata updates to a system at a specified time.
- * @param loggedInUser The logged in user
- * @param sid ID of the server
- * @param errataIds List of errata IDs to apply (as Integers)
- * @param earliestOccurrence Earliest occurrence of the errata update
- */
- public static void applyErrataHelper(User loggedInUser, Long sid, List errataIds,
- Date earliestOccurrence) {
- List<Long> systemIds = new ArrayList();
- systemIds.add(sid);
- applyErrataHelper(loggedInUser, systemIds, errataIds, earliestOccurrence);
- }
-
/**
* Apply errata updates to a system list at a specified time.
* @param loggedInUser The logged in user
commit d244d2ff60d0dc922add458ab3059a16bb949e76
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:27:45 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/domain/common/CommonFactory.java b/java/code/src/com/redhat/rhn/domain/common/CommonFactory.java
index dce8947..8300c5b 100644
--- a/java/code/src/com/redhat/rhn/domain/common/CommonFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/common/CommonFactory.java
@@ -18,20 +18,15 @@ import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.domain.org.Org;
-import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.log4j.Logger;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
-import java.security.Key;
import java.util.Calendar;
import java.util.Date;
-import javax.crypto.Mac;
-import javax.crypto.spec.SecretKeySpec;
-
/**
* KickstartFactory
* @version $Rev$
@@ -174,31 +169,4 @@ public class CommonFactory extends HibernateFactory {
criteria.add(Restrictions.eq("label", label));
return (VirtSubscriptionLevel) criteria.uniqueResult();
}
-
- /**
- * generates a hmac sha1 digest using the provided keys and data
- * @param keys the keys to generate the digest
- * @param data the data to generate the digest
- * @return the digest in hex format
- */
- public static String generateHmacSha1(String keys, String data) {
- final String hmacSha1 = "HmacSHA1";
- Mac digest;
- try {
- digest = Mac.getInstance(hmacSha1);
- Key key = new SecretKeySpec(keys.getBytes(), hmacSha1);
- digest.init(key);
- digest.update(data.getBytes(), 0, data.length());
-
- byte[] hexBytes = new Hex().encode(digest.doFinal());
-
- return String.valueOf(new String(hexBytes, "ISO-8859-1"));
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- return "";
- }
-
-
}
commit 2896fa555ff188d42f21c3e15289ef1e7905f7db
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:27:03 2012 +0100
remove unused methods and appropriate hbm query
diff --git a/java/code/src/com/redhat/rhn/domain/common/Checksum.hbm.xml b/java/code/src/com/redhat/rhn/domain/common/Checksum.hbm.xml
index f984359..89a51e5 100644
--- a/java/code/src/com/redhat/rhn/domain/common/Checksum.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/common/Checksum.hbm.xml
@@ -22,7 +22,5 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<query name="Checksum.findById">
<![CDATA[from com.redhat.rhn.domain.common.Checksum as t where t.id = :id]]>
</query>
- <query name="Checksum.findByChecksum">
- <![CDATA[from com.redhat.rhn.domain.common.Checksum as t where t.checksum = :checksum]]>
- </query>
+
</hibernate-mapping>
diff --git a/java/code/src/com/redhat/rhn/domain/common/ChecksumFactory.java b/java/code/src/com/redhat/rhn/domain/common/ChecksumFactory.java
index 2176923..4dc6c5c 100644
--- a/java/code/src/com/redhat/rhn/domain/common/ChecksumFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/common/ChecksumFactory.java
@@ -57,58 +57,6 @@ public class ChecksumFactory extends HibernateFactory {
return c;
}
- /**
- * Lookup a checksum by its hash
- * @param hash the checksum to search for
- * @return the Checksum or null if none match
- */
- public static Checksum lookupByChecksum(String hash) {
- if (hash == null) {
- return null;
- }
- Session session = null;
- Checksum c = null;
- try {
- session = HibernateFactory.getSession();
- c = (Checksum) session.getNamedQuery("Checksum.findByChecksum")
- .setParameter("checksum", hash)
- //Retrieve from cache if there
- .setCacheable(true)
- .uniqueResult();
- }
- catch (HibernateException e) {
- log.error("Hibernate exception: " + e.toString());
- throw e;
- }
- return c;
- }
-
- /**
- * Lookup a checksum type by its label
- * @param label the checksum type to search for
- * @return the ChecksumType or null if none match
- */
- public static ChecksumType lookupChecksumTypeByLabel(String label) {
- if (label == null) {
- return null;
- }
- Session session = null;
- ChecksumType ct = null;
- try {
- session = HibernateFactory.getSession();
- ct = (ChecksumType) session.getNamedQuery("ChecksumType.findByLabel")
- .setParameter("label", label)
- //Retrieve from cache if there
- .setCacheable(true)
- .uniqueResult();
- }
- catch (HibernateException e) {
- log.error("Hibernate exception: " + e.toString());
- throw e;
- }
- return ct;
- }
-
/**
* Lookup a checksum and if not exists, it is created.
* @param hash to lookup Checksum for
@@ -139,27 +87,12 @@ public class ChecksumFactory extends HibernateFactory {
}
/**
- * Saves a checksum to the database
- * @param checksumIn The Checksum to save.
- */
- public static void save(Checksum checksumIn) {
- safeCreate(checksumIn.getChecksum(), checksumIn.getChecksumType().getLabel());
- }
-
- /**
* {@inheritDoc}
*/
protected Logger getLogger() {
return log;
}
- /**
- * Delete a checksum
- * @param checksum to delete
- */
- public static void removeChecksum(Checksum checksum) {
- singleton.removeObject(checksum);
- }
}
commit f27bda3533cc609313025273f1af039bb9c7700c
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:25:00 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/ChannelTreeNode.java b/java/code/src/com/redhat/rhn/frontend/dto/ChannelTreeNode.java
index cfa951b..2a9612a 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/ChannelTreeNode.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/ChannelTreeNode.java
@@ -327,21 +327,6 @@ public class ChannelTreeNode extends BaseDto implements BaseListDto,
}
/**
- * Returns <code>true</code> if this node is a child node of the specified <code>parent
- * </code>.
- *
- * @param parent The parent to compare against
- *
- * @return <code>true</code> if this node is a child of <code>parent</code>, or return
- * <code>false</code> if <code>parent</code> is not a parent node or not the parent of
- * this node.
- */
- public boolean isChildOf(ChannelTreeNode parent) {
- return parent != null && parent.isParent() && getParentOrSelfId().equals(
- parent.getId());
- }
-
- /**
*
* {@inheritDoc}
*/
commit 947e7520cdc533c71fdeca29d341aa28909dfaf3
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:16:00 2012 +0100
remove unused methods with appropriate queries
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
index 1892dc2..304d098 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
@@ -551,91 +551,6 @@ SELECT DISTINCT C.name AS NAME,
<elaborator name="visible_server_count"/>
</mode>
-
-
-<mode name="channels_with_downloads_tree_full" class="com.redhat.rhn.frontend.dto.ChannelTreeNode">
- <query params="user_id">
-SELECT UACh.channel_name AS NAME,
- UACh.channel_id AS ID,
- UACh.channel_depth AS DEPTH,
- UACh.channel_arch_id,
- UACh.current_members,
- UACh.available_members,
- UACh.parent_or_self_label,
- UACh.parent_or_self_id,
- UACh.channel_label
- FROM rhnUserAvailableChannels UACh
- WHERE UACh.user_id = :user_id
- AND EXISTS (
-SELECT 1
- FROM rhnDownloadType DT,
- rhnDownloads D,
- rhnChannelDownloads CD
- WHERE CD.channel_id = UACh.channel_id
- AND CD.downloads_id = D.id
- AND D.download_type = DT.id
- AND DT.label = 'iso'
-)
-ORDER BY rhn_channel.channel_priority(UACh.parent_or_self_id), UACh.parent_or_self_id, UACh.channel_depth, UPPER(UACh.channel_name)
- </query>
-</mode>
-
-<mode name="channels_with_downloads_tree_supported" class="com.redhat.rhn.frontend.dto.ChannelTreeNode">
- <query params="user_id">
-SELECT UACh.channel_name AS NAME,
- UACh.channel_id AS ID,
- UACh.channel_depth AS DEPTH,
- UACh.channel_arch_id,
- UACh.current_members,
- UACh.available_members,
- UACh.parent_or_self_label,
- UACh.parent_or_self_id,
- UACh.channel_label
- FROM rhnUserAvailableChannels UACh
- WHERE UACh.user_id = :user_id
- AND EXISTS (
-SELECT 1
- FROM rhnDownloadType DT,
- rhnDownloads D,
- rhnChannelDownloads CD
- WHERE CD.channel_id = UACh.channel_id
- AND CD.downloads_id = D.id
- AND D.download_type = DT.id
- AND DT.label = 'iso'
- AND (UACh.end_of_life is NULL OR UACh.end_of_life > sysdate)
-)
-ORDER BY rhn_channel.channel_priority(UACh.parent_or_self_id), UACh.parent_or_self_id, UACh.channel_depth, UPPER(UACh.channel_name)
- </query>
-</mode>
-
-<mode name="channels_with_downloads_tree_retired" class="com.redhat.rhn.frontend.dto.ChannelTreeNode">
- <query params="user_id">
-SELECT UACh.channel_name AS NAME,
- UACh.channel_id AS ID,
- UACh.channel_depth AS DEPTH,
- UACh.channel_arch_id,
- UACh.current_members,
- UACh.available_members,
- UACh.parent_or_self_label,
- UACh.parent_or_self_id,
- UACh.channel_label
- FROM rhnUserAvailableChannels UACh
- WHERE UACh.user_id = :user_id
- AND EXISTS (
-SELECT 1
- FROM rhnDownloadType DT,
- rhnDownloads D,
- rhnChannelDownloads CD
- WHERE CD.channel_id = UACh.channel_id
- AND CD.downloads_id = D.id
- AND D.download_type = DT.id
- AND DT.label = 'iso'
- AND NOT (UACh.end_of_life is NULL OR UACh.end_of_life > sysdate)
-)
-ORDER BY rhn_channel.channel_priority(UACh.parent_or_self_id), UACh.parent_or_self_id, UACh.channel_depth, UPPER(UACh.channel_name)
- </query>
-</mode>
-
<mode name="channel_tree_ssm_install">
<query params="org_id, user_id, set_label">
SELECT ACh.channel_name AS NAME, ACh.channel_id ID, ACh.channel_depth DEPTH, ACh.channel_arch_id, ACh.current_members, ACh.available_members, (SELECT COUNT(DISTINCT CPN.name_id) FROM rhnChannelNewestPackage CPN WHERE CPN.channel_id = ACh.channel_id) AS PACKAGE_COUNT, ACh.parent_or_self_label, ACh.channel_label
diff --git a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
index 40a5e8f..5620f56 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
@@ -1831,61 +1831,6 @@ public class ChannelManager extends BaseManager {
}
/**
- * Return the list of ALL ISO channels
- * @param u Currently-logged-in user
- * @param lc ListControl (if there is one)
- * @return DataResult of ChannelTreeNodes
- */
- public static DataResult allDownloadsTree(User u, ListControl lc) {
- SelectMode m = ModeFactory.getMode("Channel_queries",
- "channels_with_downloads_tree_full");
- Map params = new HashMap();
- params.put("user_id", u.getId());
-
- DataResult dr = makeDataResult(params, params, lc, m);
- if (dr.size() == 0) {
- return null;
- }
- return dr;
- }
- /**
- * Return the list of ISO channels with SUPPORTED distributions
- * @param u Currently-logged-in user
- * @param lc ListControl (if there is one)
- * @return DataResult of ChannelTreeNodes
- */
- public static DataResult supportedDownloadsTree(User u, ListControl lc) {
- SelectMode m = ModeFactory.getMode("Channel_queries",
- "channels_with_downloads_tree_supported");
- Map params = new HashMap();
- params.put("user_id", u.getId());
-
- DataResult dr = makeDataResult(params, params, lc, m);
- if (dr.size() == 0) {
- return null;
- }
- return dr;
- }
- /**
- * Return the list of ISO channels for RETIRED distributions
- * @param u Currently-logged-in user
- * @param lc ListControl (if there is one)
- * @return DataResult of ChannelTreeNodes
- */
- public static DataResult retiredDownloadsTree(User u, ListControl lc) {
- SelectMode m = ModeFactory.getMode("Channel_queries",
- "channels_with_downloads_tree_retired");
- Map params = new HashMap();
- params.put("user_id", u.getId());
-
- DataResult dr = makeDataResult(params, params, lc, m);
- if (dr.size() == 0) {
- return null;
- }
- return dr;
- }
-
- /**
* Return a list of all downlaods available for download from the specified channel
* @param u User making the request
* @param channelLabel label of channel of interest
commit 0181a1912f80c06f2caedb2cd81b3a02ec648ded
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:10:33 2012 +0100
remove unused methods
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/ChannelFamilySystem.java b/java/code/src/com/redhat/rhn/frontend/dto/ChannelFamilySystem.java
index 4ddb0e2..0f47dc5 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/ChannelFamilySystem.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/ChannelFamilySystem.java
@@ -115,22 +115,4 @@ public class ChannelFamilySystem extends SelectableAdapter {
public String getSelectionKey() {
return id + "";
}
-
- /**
- * Returns the channel family Id
- * @param selectionKey the selection key used for this
- * @return the channel family id
- */
- public static Long parseChannelFamilyId(String selectionKey) {
- return Long.valueOf(selectionKey.split("\\|")[0]);
- }
-
- /**
- * Returns the system Id
- * @param selectionKey the selection key used for this
- * @return the system id
- */
- public static Long parseServerId(String selectionKey) {
- return Long.valueOf(selectionKey.split("\\|")[1]);
- }
}
commit d2518cfb27d07fe1f1021122342726e297b38bf2
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:09:37 2012 +0100
remove unused method and appropriate sql-query
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml b/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
index 9d7ef91..c959f11 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
@@ -303,29 +303,6 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<return alias="c" class="com.redhat.rhn.domain.channel.Channel" />
</sql-query>
- <sql-query name="Channel.latestPackage">
- <![CDATA[SELECT {p.*}
- FROM rhnPackage {p},
- rhnPackageName PN,
- rhnPackageEVR PE,
- rhnChannelPackage CP,
- rhnChannel C,
- rhnUserAvailableChannels UAC
- WHERE UAC.user_id = :user_id
- AND UAC.channel_id = C.id
- AND (C.id = :channel_id OR C.parent_channel = :channel_id)
- AND CP.channel_id = C.id
- AND CP.package_id = p.id
- AND p.evr_id = PE.id
- AND p.name_id = PN.id
- AND PN.name = :package_name
- AND UPPER(UAC.channel_label) NOT LIKE '%BETA%'
- AND UPPER(UAC.channel_name) NOT LIKE '%BETA%'
- ORDER BY PE.evr DESC
- ]]>
- <return alias="p" class="com.redhat.rhn.domain.rhnpackage.Package" />
- </sql-query>
-
<sql-query name="Channel.packageByFileName">
<![CDATA[SELECT {p.*}
FROM rhnPackage {p}
diff --git a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
index 5a97abd..2102927 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
@@ -20,7 +20,6 @@ import com.redhat.rhn.common.db.datasource.ModeFactory;
import com.redhat.rhn.common.db.datasource.SelectMode;
import com.redhat.rhn.common.db.datasource.WriteMode;
import com.redhat.rhn.common.hibernate.HibernateFactory;
-import com.redhat.rhn.common.hibernate.HibernateRuntimeException;
import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.domain.kickstart.KickstartableTree;
import com.redhat.rhn.domain.org.Org;
@@ -29,7 +28,6 @@ import com.redhat.rhn.domain.user.User;
import org.apache.log4j.Logger;
import org.hibernate.Criteria;
-import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.criterion.CriteriaSpecification;
import org.hibernate.criterion.Projections;
@@ -612,36 +610,6 @@ public class ChannelFactory extends HibernateFactory {
}
/**
- *
- * @param cIn Channel coming in
- * @param userIn User coming in
- * @param pkgIn Package Name coming in
- * @return Package object for latest in channel
- */
- public static Package lookupLatestPackage(Channel cIn, User userIn, String pkgIn) {
- Session session = null;
- List retval;
- try {
- session = HibernateFactory.getSession();
- retval = session.getNamedQuery("Channel.latestPackage")
- .setString("package_name", pkgIn)
- .setLong("user_id", userIn.getId().longValue())
- .setLong("channel_id", cIn.getId().longValue())
- .list();
- }
- catch (HibernateException e) {
- log.error(e);
- throw new
- HibernateRuntimeException("Error looking up latest package in channel");
- }
-
- if (retval.size() > 0) {
- return (Package)retval.get(0);
- }
- return null;
- }
-
- /**
* Returns true if the given name is in use.
* @param name name
* @return true if the given name is in use.
commit 80dc72213ba69a9078d68b3ae5f9f3ffd704c42b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:07:52 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
index 5aa6919..5a97abd 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
@@ -679,20 +679,6 @@ public class ChannelFactory extends HibernateFactory {
"Channel.findCustomBaseChannels", params);
}
-
-
- /**
- * Find all trees using a given channel
- * @param channel channel
- * @return List of KickstartableTrees instances
- */
- public static List getTreesForChannel(Channel channel) {
- Map params = new HashMap();
- params.put("channel_id", channel.getId());
- return singleton.listObjectsByNamedQuery(
- "KickstartableTree.findTreesForChannel", params);
- }
-
/**
* Find yum supported checksum types
* @return List of ChecksumTypes instances
commit 275c39d23400136d101c49b1e05655405ab9c8ba
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:02:46 2012 +0100
remove unused method and appropriate sql-query
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml b/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
index a670a54..9d7ef91 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
@@ -341,12 +341,6 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<return alias="p" class="com.redhat.rhn.domain.rhnpackage.Package" />
</sql-query>
- <sql-query name="Channel.getServerIds">
- <return-scalar type="long" column="server_id"/>
- <![CDATA[select server_id from rhnServerChannel where channel_id = :cid]]>
- </sql-query>
-
-
<sql-query name="Channel.getPackageCount">
<return-scalar type="int" column="package_count"/>
<![CDATA[select count(*) as package_count from rhnChannelPackage cp where cp.channel_id = :cid]]>
diff --git a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
index eeae152..5aa6919 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
@@ -743,21 +743,6 @@ public class ChannelFactory extends HibernateFactory {
}
/**
- * Lookup list of server ids associated with this channel.
- * @param cid Channel id
- * @return List of server ids associated with this channel.
- */
- public static List getServerIds(Long cid) {
- if (cid == null) {
- return Collections.EMPTY_LIST;
- }
- Map params = new HashMap();
- params.put("cid", cid);
- return singleton.listObjectsByNamedQuery("Channel.getServerIds", params);
- }
-
-
- /**
* Get package ids for a channel
* @param cid the channel id
* @return List of package ids
commit 68dc725ec062847b8ebc6fec6672e5a770ae38d1
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:01:51 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.java b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
index 02f160d..038e655 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
@@ -867,16 +867,6 @@ public class Channel extends BaseDomainHelper implements Comparable {
}
/**
- *
- * @param sourceIn source repo to add
- */
- public void addYumContentSource(ContentSource sourceIn) {
- this.getSources().add(sourceIn);
- ChannelFactory.save(this);
- }
-
-
- /**
* get the compatible checksum type to be used for repomd.xml
* based on channel release.
* If its a custom channel use the checksum_type_id from db set at creation time
commit 8f98b60b456c415f547f107c5ddf22b4e5a30d82
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 17:01:15 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.java b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
index 6ec4033..02f160d 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
@@ -483,21 +483,6 @@ public class Channel extends BaseDomainHelper implements Comparable {
}
/**
- * Adds a single package to the channel
- * @param packageIn The package to add
- * @param user the user doign the add
- */
- public void addPackage(Package packageIn, User user) {
- if (!getChannelArch().isCompatible(packageIn.getPackageArch())) {
- throw new IncompatibleArchException(packageIn.getPackageArch(),
- getChannelArch());
- }
- List<Long> list = new ArrayList<Long>();
- list.add(packageIn.getId());
- ChannelManager.addPackages(this, list, user);
- }
-
- /**
* Removes a single package from the channel
* @param user the user doing the remove
* @param packageIn The package to remove
commit 842f909e95ce8a5cc52a6fed3fda88c5fa2fa744
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 16:58:50 2012 +0100
remove unused methods
diff --git a/java/code/src/com/redhat/rhn/frontend/action/groups/BaseListAction.java b/java/code/src/com/redhat/rhn/frontend/action/groups/BaseListAction.java
index f913b10..3b09306 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/groups/BaseListAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/groups/BaseListAction.java
@@ -15,7 +15,6 @@
package com.redhat.rhn.frontend.action.groups;
-import com.redhat.rhn.domain.server.ManagedServerGroup;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.frontend.struts.RhnHelper;
@@ -45,13 +44,6 @@ public abstract class BaseListAction extends RhnAction implements Listable {
}
/** {@inheritDoc} */
- public String getDecl(RequestContext context) {
- ManagedServerGroup sg = context.lookupAndBindServerGroup();
- return getClass().getName() + sg.getId();
- }
-
-
- /** {@inheritDoc} */
public String getDataSetName() {
return "pageList";
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/groups/BaseListAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/groups/BaseListAction.java
index bf17b15..fe2e4f2 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/groups/BaseListAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/groups/BaseListAction.java
@@ -49,27 +49,6 @@ public abstract class BaseListAction extends RhnAction {
}
/**
- * Returns the parent URL
- * @param context the request context
- * @return the parent url
- */
- public String getParentUrl(RequestContext context) {
- String uri = context.getRequest().getRequestURI();
- return uri + "?" + RequestContext.SID + "=" +
- context.getRequiredParam(RequestContext.SID);
- }
-
- /**
- * Returns the declaration
- * @param context the request context
- * @return the declaration
- */
- public String getDecl(RequestContext context) {
- return getClass().getName() +
- context.getRequiredParam(RequestContext.SID);
- }
-
- /**
* Adds server info
* @param request the servlet request.
*/
commit f9d9aa192375345f5490622a7a8e9ba0949e5db2
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 16:50:16 2012 +0100
remove unused methods
diff --git a/java/code/src/com/redhat/rhn/domain/token/ActivationKey.java b/java/code/src/com/redhat/rhn/domain/token/ActivationKey.java
index 52fbe14..cb360ca 100644
--- a/java/code/src/com/redhat/rhn/domain/token/ActivationKey.java
+++ b/java/code/src/com/redhat/rhn/domain/token/ActivationKey.java
@@ -335,22 +335,6 @@ public class ActivationKey extends BaseDomainHelper {
}
/**
- * Add a package to this ActivationKey
- * @param packageNameIn TokenPackage to add
- */
- public void addPackage(TokenPackage packageNameIn) {
- this.getToken().addPackage(packageNameIn);
- }
-
- /**
- * Remove a package from this ActivationKey
- * @param packageNameIn Package name to remove
- */
- public void removePackage(TokenPackage packageNameIn) {
- this.getToken().removePackage(packageNameIn);
- }
-
- /**
* Get the Set of TokenPackage objects associated with this ActivationKey
* @return Set of TokenPackage objects.
*/
commit 21b5ea025642f33e5ca56479bd390693b5d6666f
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 16:49:38 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
index cb96e89..f6fba6f 100644
--- a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
+++ b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
@@ -1273,24 +1273,6 @@ public class ActionManager extends BaseManager {
}
/**
- * Schedules one or more package installation actions for the given server.
- * @param scheduler User scheduling the action.
- * @param srvr Server for which the action affects.
- * @param pkgs The set of packages to be removed.
- * @param earliestAction Date of earliest action to be executed
- * @return Currently scheduled PackageAction
- */
- public static PackageAction schedulePackageInstall(User scheduler,
- Server srvr, RhnSet pkgs, Date earliestAction) {
- if (!srvr.isSolaris()) {
- return (PackageAction) schedulePackageAction(scheduler, srvr, pkgs,
- ActionFactory.TYPE_PACKAGES_UPDATE, earliestAction);
- }
- return (PackageAction) schedulePackageAction(scheduler, srvr, pkgs,
- ActionFactory.TYPE_SOLARISPKGS_INSTALL, earliestAction);
- }
-
- /**
* Schedules one or more package verification actions for the given server.
* @param scheduler User scheduling the action.
* @param srvr Server for which the action affects.
commit 11fc5960ebb87dc41acfaf7f52d7b5ce1f1ee9d4
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 16:48:36 2012 +0100
remove unused method
diff --git a/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java b/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
index eb154f9..0a6bf0e 100644
--- a/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
@@ -401,22 +401,6 @@ public class ActionFactory extends HibernateFactory {
"Action.findByIdandOrgId", params);
}
-
- /**
- * Lookup the total server action count for an action
- * @param org the org to look
- * @param action the action id
- * @return the count
- */
- public static Integer getServerActionCount(Org org, Action action) {
- Map params = new HashMap();
- params.put("aid", action.getId());
- params.put("orgId", org.getId());
- return (Integer)singleton.lookupObjectByNamedQuery(
- "Action.getServerActionCount", params);
- }
-
-
/**
* Lookup the number of server actions for a particular action that have
* a certain status
diff --git a/java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml b/java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml
index abb3aea..da20e88 100644
--- a/java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/action/Action_legacyUser.hbm.xml
@@ -406,12 +406,6 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<![CDATA[from com.redhat.rhn.domain.action.Action as a where a.id = :aid and org_id = :orgId]]>
</query>
- <query name="Action.getServerActionCount">
- <![CDATA[
- select a.serverActions.size
- from com.redhat.rhn.domain.action.Action as a where a.id = :aid and org_id = :orgId]]>
- </query>
-
<sql-query name="Action.getServerActionCountByStatus">
<return-scalar type="int" column="count"/>
<![CDATA[select count(sa.server_id) as count from rhnServerAction sa where sa.action_id = :aid and
commit ad17890e34431b62a40c78855c2b72cfa7489517
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:44:59 2012 +0100
remove unused public static final attributes
diff --git a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
index 29008a1..be9de16 100644
--- a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
@@ -103,23 +103,14 @@ public class SystemManager extends BaseManager {
private static Logger log = Logger.getLogger(SystemManager.class);
- public static final String CAP_PACKAGES_RUNTXN = "packages.runTransaction";
- public static final String CAP_PACKAGES_ROLLBACK = "packages.rollBack";
- public static final String CAP_REBOOT = "reboot.reboot";
public static final String CAP_CONFIGFILES_UPLOAD = "configfiles.upload";
public static final String CAP_CONFIGFILES_DIFF = "configfiles.diff";
public static final String CAP_CONFIGFILES_MTIME_UPLOAD =
"configfiles.mtime_upload";
public static final String CAP_CONFIGFILES_DEPLOY = "configfiles.deploy";
- public static final String CAP_KICKSTART_INITIATE = "kickstart.initiate";
- public static final String CAP_SCRIPT_RUN = "script.run";
- public static final String CAP_RHNAPPLET_USE_SAT =
- "rhn_applet.use_satellite";
public static final String CAP_PACKAGES_VERIFY = "packages.verify";
public static final String CAP_CONFIGFILES_BASE64_ENC =
"configfiles.base64_enc";
- public static final String CAP_OSAD_RHNCHECK = "osad.rhn_check";
- public static final String CAP_OSAD_PING = "osad.ping";
public static final String[] INFO_PATTERNS = {
"Registered by username = '(\\w+)' using rhn_register client",
commit cf9b795f819c139eaa8b91455b08177d244268f8
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:43:33 2012 +0100
remove unused public static final attribute and appropriate queries
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Set_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Set_queries.xml
index cbc3f6b..b61f5a4 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Set_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Set_queries.xml
@@ -128,18 +128,6 @@ SELECT user_id, label, element, element_two, element_three
</query>
</write-mode>
-<write-mode name="remove_unowned_probes">
- <query params="user_id, label">
- DELETE FROM rhnSet S
- WHERE S.user_id = :user_id
- AND S.label = :label
- AND NOT EXISTS (SELECT 1 FROM rhn_check_probe CP, rhnUserServerPerms USP
- WHERE CP.probe_id = S.element
- AND USP.user_id = S.user_id
- AND CP.host_id = USP.server_id)
- </query>
-</write-mode>
-
<write-mode name="remove_unowned_actions">
<query params="user_id, label">
DELETE FROM rhnSet S
@@ -216,18 +204,6 @@ DELETE
</query>
</write-mode>
-<write-mode name="remove_unowned_system_profiles">
- <query params="user_id, label">
- DELETE FROM rhnSet S
- WHERE S.user_id = :user_id
- AND S.label = :label
- AND NOT EXISTS (SELECT 1 FROM rhnServerProfile SP, web_contact WC
- WHERE SP.org_id = WC.org_id
- AND WC.user_id = S.user_id
- AND SP.id = S.element)
- </query>
-</write-mode>
-
<write-mode name="remove_unowned_packages">
<query params="user_id, label">
DELETE
diff --git a/java/code/src/com/redhat/rhn/domain/rhnset/SetCleanup.java b/java/code/src/com/redhat/rhn/domain/rhnset/SetCleanup.java
index 853c4e5..b2f2dbf 100644
--- a/java/code/src/com/redhat/rhn/domain/rhnset/SetCleanup.java
+++ b/java/code/src/com/redhat/rhn/domain/rhnset/SetCleanup.java
@@ -52,16 +52,12 @@ public class SetCleanup {
new SetCleanup("remove_nonrhn_unowned_errata");
public static final SetCleanup UNOWNED_PACKAGES =
new SetCleanup("remove_unowned_packages");
- public static final SetCleanup UNOWNED_PROBES =
- new SetCleanup("remove_unowned_probes");
public static final SetCleanup UNOWNED_SERVERS =
new SetCleanup("remove_unowned_servers");
public static final SetCleanup UNOWNED_VIRTUAL_SERVERS =
new SetCleanup("remove_unowned_virtual_servers");
public static final SetCleanup UNOWNED_SYSTEM_GROUPS =
new SetCleanup("remove_unowned_system_groups");
- public static final SetCleanup UNOWNED_SYSTEM_PROFILES =
- new SetCleanup("remove_unowned_system_profiles");
public static final SetCleanup UNOWNED_USERS =
new SetCleanup("remove_unowned_users");
public static final SetCleanup UNOWNED_FILTERS =
commit a42fa5f87ab188eb7d3c128d12e0fe91010e8a92
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:39:40 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/domain/server/ServerConstants.java b/java/code/src/com/redhat/rhn/domain/server/ServerConstants.java
index 633569e..905562e 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerConstants.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerConstants.java
@@ -25,8 +25,6 @@ public class ServerConstants {
*/
public static final String FEATURE_PROBES = "ftr_probes";
- public static final String FEATURE_SYSTEM_GROUPING = "ftr_system_grouping";
-
private ServerConstants() {
}
commit 3bc84adf52b4d715f10401cb1d2b1c97e7c138b4
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:35:13 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java b/java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java
index 41db20a..53cf440 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/SatelliteCertificateCheck.java
@@ -32,8 +32,6 @@ import org.quartz.JobExecutionException;
*/
public class SatelliteCertificateCheck extends RhnJavaJob {
- public static final String DISPLAY_NAME = "satcert_check";
-
/**
* {@inheritDoc}
*/
commit c88f22fb24f65d664aff4df364434bccd7f3f5ec
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:25:32 2012 +0100
remove unused data from the rhnUserGroupType table
diff --git a/schema/spacewalk/common/data/rhnUserGroupType.sql b/schema/spacewalk/common/data/rhnUserGroupType.sql
index f74c01d..0590d00 100644
--- a/schema/spacewalk/common/data/rhnUserGroupType.sql
+++ b/schema/spacewalk/common/data/rhnUserGroupType.sql
@@ -55,24 +55,6 @@ insert into rhnUserGroupType (id, label, name) values (
insert into rhnUserGroupType (id, label, name) values (
sequence_nextval('rhn_usergroup_type_seq'),
- 'coma_admin',
- 'Coma CMS Administrator'
-);
-
-insert into rhnUserGroupType (id, label, name) values (
- sequence_nextval('rhn_usergroup_type_seq'),
- 'coma_author',
- 'Coma CMS Author'
-);
-
-insert into rhnUserGroupType (id, label, name) values (
- sequence_nextval('rhn_usergroup_type_seq'),
- 'coma_publisher',
- 'Coma CMS Publisher'
-);
-
-insert into rhnUserGroupType (id, label, name) values (
- sequence_nextval('rhn_usergroup_type_seq'),
'config_admin',
'Configuration Administrator'
);
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-rhnUserGroupType_data.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-rhnUserGroupType_data.sql
new file mode 100644
index 0000000..a8afb55
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/105-rhnUserGroupType_data.sql
@@ -0,0 +1,3 @@
+DELETE FROM rhnUserGroupType WHERE label = 'coma_admin';
+DELETE FROM rhnUserGroupType WHERE label = 'coma_author';
+DELETE FROM rhnUserGroupType WHERE label = 'coma_publisher';
commit 551dfce1e30854a9fb787a26e627eb180ccd8865
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:24:55 2012 +0100
remove unused public static final attributes
diff --git a/java/code/src/com/redhat/rhn/domain/role/RoleFactory.java b/java/code/src/com/redhat/rhn/domain/role/RoleFactory.java
index 5486e4f..8fa94c2 100644
--- a/java/code/src/com/redhat/rhn/domain/role/RoleFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/role/RoleFactory.java
@@ -102,21 +102,6 @@ public class RoleFactory extends HibernateFactory {
public static final Role RHN_SUPERUSER = lookupByLabel("rhn_superuser");
/**
- * The constant representing coma_admin
- */
- public static final Role COMA_ADMIN = lookupByLabel("coma_admin");
-
- /**
- * The constant representing coma_author
- */
- public static final Role COMA_AUTHOR = lookupByLabel("coma_author");
-
- /**
- * The constant representing coma_publisher
- */
- public static final Role COMA_PUBLISHER = lookupByLabel("coma_publisher");
-
- /**
* The constant representing rhn_support
*/
public static final Role RHN_SUPPORT = lookupByLabel("rhn_support");
commit bb082ccd9eb2b770b860e254a657d439f268f0b7
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:14:59 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java
index 2d8bd2c..1d21123 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java
@@ -48,7 +48,7 @@ import com.redhat.rhn.manager.channel.repo.EditRepoCommand;
* @version $Rev$
*/
public class RepoDetailsAction extends RhnAction {
- public static final String ORG = "org";
+
public static final String CREATE_MODE = "create_mode";
public static final String REPO = "repo";
public static final String URL = "url";
commit 35f637e27f6c66c5e9d8149069d6eaddb9674945
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:14:31 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java b/java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java
index dea9e77..1a94c98 100644
--- a/java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java
+++ b/java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java
@@ -47,15 +47,8 @@ import javax.servlet.http.HttpServletRequest;
*/
public class RecurringEventPicker {
- /**
- * Typical form field when dealing with a date picker.
- * @see com.redhat.rhn.frontend.struts.StrutsDelegate
- */
- public static final String USE_DATE = "use_date";
-
private static final String STATUS_DISABLED = "disabled";
-
//Daily defines
// 0 %d %d * * *
private static final String STATUS_DAILY = "daily";
@@ -63,7 +56,6 @@ public class RecurringEventPicker {
private static final String DAILY_HOUR = "_daily_hour";
private static final String DAILY_MINUTE = "_daily_minute";
-
//Weekly defines
// 0 %d %d * * %d
private static final String STATUS_WEEKLY = "weekly";
@@ -80,11 +72,9 @@ public class RecurringEventPicker {
private static final String MONTHLY_MINUTE = "_monthly_minute";
private static final String MONTHLY_DAY_OF_MONTH = "_day_month";
-
private static final String STATUS_CRON = "cron";
private static final String CRON_ENTRY = "_cron";
-
private static final String WHITE_SPACE = "\\s+";
private static final Integer[] DAY_NUMBERS = {Calendar.SUNDAY, Calendar.MONDAY,
@@ -92,7 +82,6 @@ public class RecurringEventPicker {
Calendar.THURSDAY, Calendar.FRIDAY,
Calendar.SATURDAY};
-
/**
.------------------- Second (0-59)
| .---------------- minute (0 - 59)
@@ -104,13 +93,10 @@ public class RecurringEventPicker {
* * * * * * command to be executed
*/
-
private String name;
private String status;
private String cronEntry;
-
-
/**
* Constructor
* @param name0 the name
commit a93453974703641f85788af1dc457f5dfd64f490
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:12:47 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ManagedServerGroupSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ManagedServerGroupSerializer.java
index 26987cd..606947c 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ManagedServerGroupSerializer.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ManagedServerGroupSerializer.java
@@ -42,7 +42,6 @@ import redstone.xmlrpc.XmlRpcSerializer;
*/
public class ManagedServerGroupSerializer implements XmlRpcCustomSerializer {
- public static final String MAX_MEMBERS = "max_system_count";
public static final String CURRENT_MEMBERS = "system_count";
/** {@inheritDoc} */
commit 32908e91bcbe340ba69e774b5e4382295eed90a0
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:11:55 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
index 2aa20a3..f7def06 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
@@ -47,7 +47,6 @@ import javax.servlet.jsp.tagext.BodyTagSupport;
*/
public class ListTag extends BodyTagSupport {
- public static final String RENDER_CMD = "__renderCmd";
private static final long serialVersionUID = 8581790371344355223L;
private static final String[] PAGINATION_NAMES = { "allBackward",
"backward", "forward", "allForward" };
commit 0c6e9d81a3f2310570ffb77658d12ee676dac972
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:06:41 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index d8d8d1f..e93b4f4 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -113,7 +113,7 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
private static Logger log = Logger.getLogger(KickstartScheduleCommand.class);
public static final String DHCP_NETWORK_TYPE = "dhcp";
public static final String LINK_NETWORK_TYPE = "link";
- public static final String STATIC_NETWORK_TYPE = "static";
+
// up2date is required to be 2.9.0
public static final String UP2DATE_VERSION = "2.9.0";
public static final String TARGET_PROFILE_TYPE_EXISTING = "existing";
commit 974e75df3f6dd97a7fcb908c9908144d7b3ece72
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:06:04 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
index ad44d87..9ee89f4 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartDetailsEditAction.java
@@ -75,7 +75,6 @@ public class KickstartDetailsEditAction extends BaseKickstartEditAction {
public static final String VIRT_DISK_SIZE = "virt_disk_size";
public static final String VIRT_MEMORY = "virt_mem_mb";
public static final String VIRT_BRIDGE = "virt_bridge";
- public static final String VIRT_PATH = "virt_disk_path";
public static final String INVALID = "invalid";
commit 421fa37be495f2057963a69b752a1f0d7fbacad1
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:05:23 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java
index aab4a3e..467f91a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/ErrataSetupAction.java
@@ -50,7 +50,6 @@ import javax.servlet.http.HttpServletResponse;
*/
public class ErrataSetupAction extends RhnAction implements Listable {
- public static final String DISPATCH = "dispatch";
public static final String LIST_NAME = "errataList";
public static final String ALL = "All";
commit ce0bff39a2114eec0487c1e77c699d7c1990c3ab
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 14:03:40 2012 +0100
remove whole KickstartQueries
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
index 1419fd6..2d9dd96 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java
@@ -263,7 +263,7 @@ public class KickstartFactory extends HibernateFactory {
KickstartCommandName retval = null;
session = HibernateFactory.getSession();
Query query =
- session.getNamedQuery(KickstartQueries.KICKSTART_CMD_FIND_BY_LABEL);
+ session.getNamedQuery("KickstartCommandName.findByLabel");
//Retrieve from cache if there
query.setCacheable(true);
query.setParameter("name", commandName);
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartQueries.java b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartQueries.java
deleted file mode 100644
index 7299561..0000000
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartQueries.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.domain.kickstart;
-
-/**
- * Constants defining Kickstart Hibernate queries
- * @version $Rev $
- */
-public class KickstartQueries {
-
- public static final String KICKSTARTABLE_TREE_FIND_BY_ID =
- "KickstartableTree.findById";
-
- public static final String KICKSTARTABLE_TREE_FIND_BY_LABEL_ORG =
- "KickstartableTree.findByLabelAndOrg";
-
- public static final String KICKSTARTABLE_TREE_FIND_BY_LABEL_NULL_ORG =
- "KickstartableTree.findByLabelAndNullOrg";
-
- public static final String KICKSTARTABLE_TREE_FIND_BY_CHANNEL_ORG =
- "KickstartableTree.findByChannelAndOrg";
-
- public static final String KICKSTART_CMD_FIND_BY_ID = "KickstartComandName.findById";
-
- public static final String KICKSTART_CMD_FIND_BY_LABEL =
- "KickstartCommandName.findByLabel";
-
- public static final String KICKSTART_CMD_LIST_ADVANCED_OPTIONS =
- "KickstartCommandName.listAdvancedOptions";
-
- public static final String KICKSTART_CMD_NAME_REQUIRED_OPTIONS =
- "KickstartCommandName.requiredOptions";
-
-
- // Prevent constant class from being instantiated
- private KickstartQueries() {
-
- }
-}
commit f5665316f0230285053e2563c6461718bd2730f4
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:49:58 2012 +0100
remove unused public static final attributes
diff --git a/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java b/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
index 8e81fe6..c3136c7 100644
--- a/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java
@@ -79,11 +79,6 @@ public class ErrataFactory extends HibernateFactory {
public static final String ERRATA_TYPE_ENHANCEMENT = "Product Enhancement Advisory";
public static final String ERRATA_TYPE_SECURITY = "Security Advisory";
- public static final String ERRATA_TYPE_SECURITY_CRIT = "Security Advisory (Critical)";
- public static final String ERRATA_TYPE_SECURITY_IMP = "Security Advisory (Important)";
- public static final String ERRATA_TYPE_SECURITY_MOD = "Security Advisory (Moderate)";
- public static final String ERRATA_TYPE_SECURITY_LOW = "Security Advisory (Low)";
-
private ErrataFactory() {
super();
}
commit 0457c6037ce1884a99300a0d7101fc87c0349549
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:49:23 2012 +0100
remove unused public static final attributes
diff --git a/java/code/src/com/redhat/rhn/manager/entitlement/EntitlementManager.java b/java/code/src/com/redhat/rhn/manager/entitlement/EntitlementManager.java
index 55a55a1..2de29e6 100644
--- a/java/code/src/com/redhat/rhn/manager/entitlement/EntitlementManager.java
+++ b/java/code/src/com/redhat/rhn/manager/entitlement/EntitlementManager.java
@@ -84,14 +84,6 @@ public class EntitlementManager extends BaseManager {
BASE_ENTITLEMENTS.add(MANAGEMENT);
}
-
- // SERVICES
- public static final String SVC_UPDATES = "updates";
- public static final String SVC_MANAGEMENT = "management";
- public static final String SVC_PROVISIONING = "provisioning";
- public static final String SVC_MONITORING = "monitoring";
- public static final String SVC_NONLINUX = "nonlinux";
-
/**
* Returns the entitlement whose name matches the given <code>name</code>
* @param name Name of Entitlement.
commit 4818f2a66df3546372e41e9d194a80e322f47953
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:42:10 2012 +0100
remove unused public static final attributes
diff --git a/java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java b/java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java
index 4247f12..3a07748 100644
--- a/java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java
+++ b/java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java
@@ -81,12 +81,6 @@ public class ConfigurationManager extends BaseManager {
private static final ConfigurationManager INSTANCE = new ConfigurationManager();
- // Used as keys into the Map returned by a file-content-validation error
- // see validateContent()
- public static final String KEY = "key";
- public static final String ARG0 = "arg0";
- public static final String ARG1 = "arg1";
-
//These are used when enabling a system for configuration management
//through our helpful user interface
public static final int ENABLE_SUCCESS = 0;
@@ -95,9 +89,6 @@ public class ConfigurationManager extends BaseManager {
public static final int ENABLE_ERROR_PACKAGES = 3;
public static final int ENABLE_NEED_ORG_ADMIN = 4;
- public static final int FILES = 0;
- public static final int DIRECTORIES = 1;
-
public static final String FEATURE_CONFIG = "ftr_config";
/**
* Prevent people for making objects of this class.
commit 5580fc9d137566d95b6ea3d780095b73f61d31bf
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:38:47 2012 +0100
remove unused public static final attributes
diff --git a/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java b/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
index 5f8bb3d..1beed7a 100644
--- a/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
+++ b/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
@@ -35,10 +35,6 @@ public class ConfigDefaults {
public static final String SSL_AVAILABLE = "ssl_available";
- //TODO: was private. Made public for AccessTest
- public static final String WEB_SATELLITE = "web.satellite";
-
- public static final String ENABLE_OAI_SYNC = "enable_oai_sync";
public static final String SYSTEM_CHECKIN_THRESHOLD = "web.system_checkin_threshold";
public static final String WEB_ALLOW_PXT_PERSONALITIES = "web.allow_pxt_personalities";
public static final String WEB_DEFAULT_MAIL_FROM = "web.default_mail_from";
@@ -59,8 +55,6 @@ public class ConfigDefaults {
public static final String WEB_SESSION_SWAP_SECRET_4 = "web.session_swap_secret_4";
public static final String WEB_SMTP_SERVER = "web.smtp_server";
- public static final String TASKOMATIC_TASKS = "taskomatic.tasks";
- public static final String TASKOMATIC_DEFAULT_TASKS = "taskomatic.default_tasks";
public static final String ERRATA_CACHE_COMPUTE_THRESHOLD
= "errata_cache_compute_threshold";
@@ -78,10 +72,6 @@ public class ConfigDefaults {
public static final String WEB_SCOUT_SHARED_KEY = "monitoring.scout_shared_key";
- public static final String GPG_KEYRING = "web.gpg_keyring";
-
- public static final String OVAL_MOUNT_POINT = "web.oval_mount_point";
-
public static final String KICKSTART_HOST = "kickstart_host";
public static final String CONFIG_REVISION_MAX_SIZE = "web.maximum_config_file_size";
@@ -92,8 +82,6 @@ public class ConfigDefaults {
public static final String DEFAULT_SAT_PARENT = "satellite.rhn.redhat.com";
- public static final String TINY_URL_TIMEOUT = "server.satellite.tiny_url_timeout";
-
public static final String FORCE_UNENTITLEMENT = "web.force_unentitlement";
public static final String PRODUCT_NAME = "web.product_name";
commit c3dfb7c0b62a9ed2f1891035d098b605eb6d766e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:36:48 2012 +0100
remove unused protected static final attribute
diff --git a/java/code/src/org/cobbler/CobblerObject.java b/java/code/src/org/cobbler/CobblerObject.java
index 81f5490..c964142 100644
--- a/java/code/src/org/cobbler/CobblerObject.java
+++ b/java/code/src/org/cobbler/CobblerObject.java
@@ -53,7 +53,7 @@ public abstract class CobblerObject {
protected static final String MGMT_CLASSES = "mgmt_classes";
protected static final String TEMPLATE_FILES = "template_files";
protected static final String UID = "uid";
- protected static final String PROFILE = "profile";
+
private static final String REDHAT_KEY = "redhat_management_key";
public static final String INHERIT_KEY = "<<inherit>>";
commit b686b0f41f04b1d9616dee81578de15f78b52e6c
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:35:47 2012 +0100
remove unused public static final attribute
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/tree/BaseTreeAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/tree/BaseTreeAction.java
index ffe88ae..abd9a33 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/tree/BaseTreeAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/tree/BaseTreeAction.java
@@ -50,7 +50,7 @@ public abstract class BaseTreeAction extends BaseEditAction {
public static final String LABEL = "label";
public static final String NOCHANNELS = "nochannels";
public static final String NOINSTALLTYPES = "noinstalltypes";
- public static final String RHN_KICKSTART = "rhnkickstart";
+
public static final String HIDE_SUBMIT = "hidesubmit";
public static final String KERNEL_OPTS = "kernelopts";
public static final String POST_KERNEL_OPTS = "postkernelopts";
commit 678d0e8e3ce1ff126a9a41138dd873ac23c17a55
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:35:23 2012 +0100
remove unused protected static final attribute
diff --git a/java/code/src/com/redhat/rhn/frontend/action/configuration/BaseRankChannels.java b/java/code/src/com/redhat/rhn/frontend/action/configuration/BaseRankChannels.java
index 5002215..b8fe6ed 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/configuration/BaseRankChannels.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/configuration/BaseRankChannels.java
@@ -50,7 +50,7 @@ public abstract class BaseRankChannels extends RhnLookupDispatchAction {
protected static final String POSSIBLE_CHANNELS = "possibleChannels";
protected static final String SELECTED_CHANNEL = "selectedChannel";
- protected static final String NO_SCRIPT = "noScript";
+
protected static final String RANKED_VALUES = "rankedValues";
/**
commit a6b94b59529df0b2a140295e48c5e6039a767d79
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:34:48 2012 +0100
remove unused protected static final attributes
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/BaseDto.java b/java/code/src/com/redhat/rhn/frontend/dto/BaseDto.java
index ae52195..78bd224 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/BaseDto.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/BaseDto.java
@@ -28,10 +28,6 @@ import org.apache.commons.lang.builder.ToStringBuilder;
*/
public abstract class BaseDto extends SelectableAdapter implements Identifiable {
-
- protected static final Integer ONE = new Integer(1);
- protected static final Integer ZERO = new Integer(0);
-
/**
* Returns id to be stored in RhnSet.
* @return id to be stored in RhnSet.
commit cad7f7ea077da5f4354f086b0148fdb58ca61147
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:16:22 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/SatelliteIsAProxyException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/SatelliteIsAProxyException.java
deleted file mode 100644
index 975ab4f..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/SatelliteIsAProxyException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-/*
- * AUTOMATICALLY GENERATED FILE, DO NOT EDIT.
- */
-package com.redhat.rhn.frontend.xmlrpc;
-
-import com.redhat.rhn.FaultException;
-
-/**
- * system is already an RHN Proxy
- * <p>
-
- *
- * @version definition($Rev: 76724 $)/template($Rev: 67725 $)
- */
-public class SatelliteIsAProxyException extends FaultException {
-
-
- /////////////////////////
- // Constructors
- /////////////////////////
- /**
- * Constructor
- */
- public SatelliteIsAProxyException() {
- super(1027 , "satelliteIsProxy" ,
- "system is already an active Proxy Server");
- // begin member variable initialization
- }
-
- /**
- * Constructor
- * @param cause the cause (which is saved for later retrieval
- * by the Throwable.getCause() method). (A null value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- */
- public SatelliteIsAProxyException(Throwable cause) {
- super(1027 , "satelliteIsProxy" ,
- "system is already an active Proxy Server",
- cause);
- // begin member variable initialization
- }
-
- /////////////////////////
- // Getters/Setters
- /////////////////////////
-}
commit 5bf1207995c40042586ef1a68b9ee8f43f68d207
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:16:06 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/monitoring/ProbeDto.java b/java/code/src/com/redhat/rhn/frontend/dto/monitoring/ProbeDto.java
deleted file mode 100644
index f0640fa..0000000
--- a/java/code/src/com/redhat/rhn/frontend/dto/monitoring/ProbeDto.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.dto.monitoring;
-
-import com.redhat.rhn.common.util.StringUtil;
-import com.redhat.rhn.domain.monitoring.Probe;
-import com.redhat.rhn.domain.monitoring.ServerProbe;
-
-/**
- * ProbeDto - Simple DTO around a Probe that adds a convenience method to determine
- * if the Probe is a suite probe or not.
- *
- * @version $Rev$
- */
-public class ProbeDto implements Comparable {
-
- private Probe probe;
-
- /**
- * Constructor with probe
- * @param probeIn probe to use with this dto.
- */
- public ProbeDto(Probe probeIn) {
- this.probe = probeIn;
- }
-
- /**
- * @return Returns the probe.
- */
- public Probe getProbe() {
- return probe;
- }
-
- /**
- * Determine if this Probe is a member of a ProbeSuite
- * @return Returns the suiteProbe.
- */
- public boolean getIsSuiteProbe() {
- ServerProbe sprobe = (ServerProbe) probe;
- return (sprobe.getTemplateProbe() != null);
- }
-
- /**
- * Convenience method to get the ID of the ProbeSuite this Probe
- * is a member of. Throws an IllegalArgumentException if the contained
- * probe isn't a member of a Suite.
- * @return id of this Probe's Probe Suite.
- */
- public Long getProbeSuiteId() {
- if (!getIsSuiteProbe()) {
- throw new IllegalArgumentException("Shouldn't call this on a non suite probe");
- }
- return ((ServerProbe) probe).getTemplateProbe().getProbeSuite().getId();
- }
-
- /**
- * Convenience method to get the ID of the TemplateProbe for this Probe
- * is a member of. Throws an IllegalArgumentException if the contained
- * probe isn't a member of a Suite.
- * @return id of this Probe's template probe
- */
- public Long getTemplateProbeId() {
- if (!getIsSuiteProbe()) {
- throw new IllegalArgumentException("Shouldn't call this on a non suite probe");
- }
- return ((ServerProbe) probe).getTemplateProbe().getId();
- }
-
- /**
- * Get a HTML friendly status string. Replaces \n and \r\n with <br>
- * @return HTML friendly string
- */
- public String getStateOutputString() {
- if (getProbe().getState().getOutput() != null) {
- return StringUtil.htmlifyText(getProbe().getState().getOutput());
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public int compareTo(Object o) {
- Probe p1 = getProbe();
- Probe p2 = ((ProbeDto) o).getProbe();
- return p1.compareTo(p2);
- }
-
-}
commit 1ce6f5afa75661ba2ea2a43896668e27b413a0ce
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:15:14 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/OrgDeleteDto.java b/java/code/src/com/redhat/rhn/frontend/dto/OrgDeleteDto.java
deleted file mode 100644
index 472f546..0000000
--- a/java/code/src/com/redhat/rhn/frontend/dto/OrgDeleteDto.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.dto;
-
-
-/**
- *
- * OrgDto class represents Org lists
- * @version $Rev$
- */
-public class OrgDeleteDto extends BaseDto {
- private Long id;
- private String name;
-
- /**
- *
- * {@inheritDoc}
- */
- public Long getId() {
- return id;
- }
-
- /**
- *
- * @param idIn OrgIn Id
- */
- public void setId(Long idIn) {
- this.id = idIn;
- }
-
- /**
- *
- * @return Name of Org
- */
- public String getName() {
- return name;
- }
-
- /**
- *
- * @param nameIn of Org to set
- */
- public void setName(String nameIn) {
- this.name = nameIn;
- }
-}
commit cb67a82899a59838fdb3d2515b2e1cd53ce595bf
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:14:55 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/NotActivatedSatelliteException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/NotActivatedSatelliteException.java
deleted file mode 100644
index e64f7ab..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/NotActivatedSatelliteException.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-/*
- * AUTOMATICALLY GENERATED FILE, DO NOT EDIT.
- */
-package com.redhat.rhn.frontend.xmlrpc;
-
-import com.redhat.rhn.FaultException;
-
-/**
- * system cannot be deactivated because it was never an activated satellite
- * <p>
-
- *
- * @version definition($Rev: 76724 $)/template($Rev: 67725 $)
- */
-public class NotActivatedSatelliteException extends FaultException {
-
-
- /////////////////////////
- // Constructors
- /////////////////////////
- /**
- * Constructor
- */
- public NotActivatedSatelliteException() {
- super(1025 , "notActiveSatellite" , "System is not an active Satellite");
- // begin member variable initialization
- }
-
- /**
- * Constructor
- * @param cause the cause (which is saved for later retrieval
- * by the Throwable.getCause() method). (A null value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- */
- public NotActivatedSatelliteException(Throwable cause) {
- super(1025 , "notActiveSatellite" , "System is not an active Satellite" , cause);
- // begin member variable initialization
- }
-
- /////////////////////////
- // Getters/Setters
- /////////////////////////
-}
commit ac05e1427957ea8e6d35d39b833a9ba9026da776
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:14:40 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchArchException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchArchException.java
deleted file mode 100644
index 32b4244..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchArchException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-package com.redhat.rhn.frontend.xmlrpc;
-
-import com.redhat.rhn.FaultException;
-import com.redhat.rhn.common.localization.LocalizationService;
-
-/**
- * Invalid Package Exception
- *
- * @version $Rev$
- */
-public class NoSuchArchException extends FaultException {
-
- /**
- * Constructor
- * @param arch The arch that was request
- */
- public NoSuchArchException(String arch) {
- super(1062, "Invalid Arch" , LocalizationService.getInstance().
- getMessage("api.system.invalidarch", new Object [] {arch}));
- }
-
- /**
- * Constructor
- * @param arch The arch that was requested
- * @param cause the cause
- */
- public NoSuchArchException(String arch, Throwable cause) {
- super(1062, "invalidPackage" , LocalizationService.getInstance().
- getMessage("api.system.invalidarch", new Object [] {arch}), cause);
- }
-
-}
commit ebd13c601485150515981ed1255cde420fe7d3ea
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:13:33 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSatChanForVersionException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSatChanForVersionException.java
deleted file mode 100644
index 46e3561..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSatChanForVersionException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-/*
- * AUTOMATICALLY GENERATED FILE, DO NOT EDIT.
- */
-package com.redhat.rhn.frontend.xmlrpc;
-
-import com.redhat.rhn.FaultException;
-
-/**
- * cannot find a valid satellite child channel for particular base channel +
- * sat version combo
- * <p>
-
- *
- * @version definition($Rev: 76724 $)/template($Rev: 67725 $)
- */
-public class NoSatChanForVersionException extends FaultException {
-
-
- /////////////////////////
- // Constructors
- /////////////////////////
- /**
- * Constructor
- */
- public NoSatChanForVersionException() {
- super(1029 , "noSatChanForVersion" , "Cannot find correct " +
- "channel for given version");
- // begin member variable initialization
- }
-
- /**
- * Constructor
- * @param cause the cause (which is saved for later retrieval
- * by the Throwable.getCause() method). (A null value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- */
- public NoSatChanForVersionException(Throwable cause) {
- super(1029 , "noSatChanForVersion" , "Cannot find correct " +
- "channel for given version" , cause);
- // begin member variable initialization
- }
-
- /////////////////////////
- // Getters/Setters
- /////////////////////////
-}
commit ba3ef1b1f6b3a31ba8c3dd13c4588ff0bc6ee15b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:13:15 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/MethodNotFoundException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/MethodNotFoundException.java
deleted file mode 100644
index 76413e0..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/MethodNotFoundException.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-/*
- * AUTOMATICALLY GENERATED FILE, DO NOT EDIT.
- */
-package com.redhat.rhn.frontend.xmlrpc;
-
-import com.redhat.rhn.FaultException;
-
-/**
- * method not found
- * <p>
-
- *
- * @version definition($Rev: 76724 $)/template($Rev: 67725 $)
- */
-public class MethodNotFoundException extends FaultException {
-
-
- /////////////////////////
- // Constructors
- /////////////////////////
- /**
- * Constructor
- */
- public MethodNotFoundException() {
- super(-6 , "methodNotFound" , "method not found");
- // begin member variable initialization
- }
-
- /**
- * Constructor
- * @param cause the cause (which is saved for later retrieval
- * by the Throwable.getCause() method). (A null value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- */
- public MethodNotFoundException(Throwable cause) {
- super(-6 , "methodNotFound" , "method not found" , cause);
- // begin member variable initialization
- }
-
- /////////////////////////
- // Getters/Setters
- /////////////////////////
-}
commit eee5d8630c3a2fdf3ce7ffccfad285bce916726b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:11:27 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartPrePostCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartPrePostCommand.java
deleted file mode 100644
index a7206d2..0000000
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartPrePostCommand.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.manager.kickstart;
-
-import com.redhat.rhn.domain.kickstart.KickstartScript;
-import com.redhat.rhn.domain.user.User;
-
-import org.apache.log4j.Logger;
-
-import java.io.UnsupportedEncodingException;
-import java.util.Iterator;
-
-/**
- * KickstartPrePostCommand - for editing the pre and post steps
- * in a kickstart.
- * @version $Rev$
- */
-public class KickstartPrePostCommand extends BaseKickstartCommand {
-
- /**
- * Logger for this class
- */
- private static Logger logger = Logger
- .getLogger(KickstartPrePostCommand.class);
-
- /**
- * Constructor
- * @param ksidIn id of the Kickstart to lookup
- * @param userIn userIn who owns the Kickstart
- */
- public KickstartPrePostCommand(Long ksidIn, User userIn) {
- super(ksidIn, userIn);
- }
-
- /**
- * Set the contents of the pre script.
- * @param language or interpreter used
- * @param contentsIn of the actual script
- */
- public void setPreScript(String language, String contentsIn) {
- logger.debug("setPreScript(String language=" + language +
- ", String contentsIn=" + contentsIn + ") - start");
-
- setScript(language, contentsIn, KickstartScript.TYPE_PRE);
- logger.debug("setPreScript(String, String) - end");
- }
-
- /**
- * Set the contents of the post script.
- * @param language or interpreter used
- * @param contentsIn of the actual script
- */
- public void setPostScript(String language, String contentsIn) {
- logger.debug("setPostScript(String language=" + language +
- ", String contentsIn=" + contentsIn + ") - start");
-
- setScript(language, contentsIn, KickstartScript.TYPE_POST);
- logger.debug("setPostScript(String, String) - end");
- }
-
-
- /**
- * Set the contents of the pre script.
- * @param language or interpreter used
- * @param contentsIn of the actual script
- */
- private void setScript(String language, String contentsIn, String typeIn) {
- logger.debug("setPreScript(String language=" + language +
- ", String contentsIn=" + contentsIn + ") - start");
-
- try {
- if (language != null) {
- // Edit existing KickstartScript
- KickstartScript kss = null;
- if (typeIn.equals(KickstartScript.TYPE_PRE)) {
- kss = ksdata.getPreKickstartScript();
- }
- else if (typeIn.equals(KickstartScript.TYPE_POST)) {
- kss = ksdata.getPostKickstartScript();
- }
- else {
- throw new IllegalArgumentException(
- "Unknown KickstartScript type: " + typeIn);
- }
-
- if (kss != null) {
- kss.setInterpreter(language);
- kss.setData(contentsIn.getBytes("UTF-8"));
- }
- else {
- // Add new one
- addKickstartScript(language, contentsIn, typeIn);
- }
- }
- else {
- Iterator i = this.ksdata.getScripts().iterator();
- while (i.hasNext()) {
- KickstartScript script = (KickstartScript) i.next();
- if (script.getScriptType().equals(typeIn)) {
- this.ksdata.getScripts().remove(script);
- }
- }
- // this.ksdata.setPre(contentsIn.getBytes("UTF-8"));
- }
- }
- catch (UnsupportedEncodingException e) {
- logger.error("setPreScript(String, String)", e);
- throw new RuntimeException("UnsupportedEncodingException" +
- " while trying to set Pre script", e);
- }
- logger.debug("setPreScript(String, String) - end");
- }
-
-
- private void addKickstartScript(String language, String contentsIn,
- String scriptTypeIn)
- throws UnsupportedEncodingException {
- KickstartScript kss = new KickstartScript();
- kss.setKsdata(ksdata);
- kss.setData(contentsIn.getBytes("UTF-8"));
- kss.setInterpreter(language);
- kss.setScriptType(scriptTypeIn);
- this.ksdata.addScript(kss);
- }
-
-
- /**
- * Get the language in use by the script. The #!/bin/sh
- * at the top of the file.
- *
- * @return String of the language chosen
- */
- public String getPreLanguage() {
- KickstartScript kss = ksdata.getPreKickstartScript();
- if (kss != null) {
- return kss.getInterpreter();
- }
- return null;
- }
-
- /**
- * Get the contents of the string.
- * @return String contents of the pre script
- */
- public String getPreContents() {
- KickstartScript kss = ksdata.getPreKickstartScript();
- if (kss != null) {
- return kss.getDataContents();
- }
- // return ksdata.getPreContents();
- return null;
- }
-
- /**
- * Get the String version of the post script
- * @return String post script
- */
- public String getPostContents() {
- KickstartScript kss = ksdata.getPostKickstartScript();
- if (kss != null) {
- return kss.getDataContents();
- }
- // return ksdata.getPostContents();
- return null;
- }
-
- /**
- * Get the interpreter used by the Post script
- * @return String of post interpereter
- */
- public String getPostLanguage() {
- KickstartScript kss = ksdata.getPostKickstartScript();
- if (kss != null) {
- return kss.getInterpreter();
- }
- return null;
- }
-
-}
commit 5c7e5b32cd9bbe0f0993026562853a6420908101
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:09:11 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/LabelAlreadyExistsException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/LabelAlreadyExistsException.java
deleted file mode 100644
index f664dd9..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/LabelAlreadyExistsException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.xmlrpc.kickstart;
-
-import com.redhat.rhn.FaultException;
-import com.redhat.rhn.common.localization.LocalizationService;
-
-
-/**
- * LabelAlreadyExistsException
- * @version $Rev$
- */
-public class LabelAlreadyExistsException extends FaultException {
-
- /**
- * Constructor
- * @param label the kickstart label
- */
- public LabelAlreadyExistsException(String label) {
- super(2750, "kickstartLabelAlreadyExists" , LocalizationService.getInstance().
- getMessage("api.kickstart.labelalreadyinuse", new Object [] {label}));
- }
-
-}
commit 62e301f28376238a76d19a1262e7fcba91d11b57
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:03:51 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartCommandComparator.java b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartCommandComparator.java
deleted file mode 100644
index 7a3b000..0000000
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartCommandComparator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.domain.kickstart;
-
-import java.util.Comparator;
-
-/**
- * KickstartCommandComparator this compares custom kickstart commands.
- * It works essentially as this. We prefer an id, so we compare ids if we can.
- * If we can't then the one with an id is first, if neither objects have an id, we compare
- * customPositions
- * @version $Rev$
- */
-public class KickstartCommandComparator implements Comparator {
-
- /**
- *
- * {@inheritDoc}
- */
- public int compare(Object o1, Object o2) {
- KickstartCommand kc1 = (KickstartCommand) o1;
- KickstartCommand kc2 = (KickstartCommand) o2;
-
- if (kc1.getId() != null && kc2.getId() != null) {
- return kc1.getId().compareTo(kc2.getId());
- }
- else if (kc1.getId() == null && kc2.getId() == null) {
- return kc1.getCustomPosition().compareTo(kc2.getCustomPosition());
- }
- else if (kc1.getId() != null && kc2.getId() == null) {
- return -1;
- }
- else if (kc1.getId() == null && kc2.getId() != null) {
- return 1;
- }
- return 0;
- }
-
-}
commit 6457b587acca15dde114a55bff4cbf2ef6d3a9e9
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:02:52 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidSatCertException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidSatCertException.java
deleted file mode 100644
index bedc083..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidSatCertException.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-/*
- * AUTOMATICALLY GENERATED FILE, DO NOT EDIT.
- */
-package com.redhat.rhn.frontend.xmlrpc;
-
-import com.redhat.rhn.FaultException;
-
-/**
- * the provided satellite certificate is invalid
- * <p>
-
- *
- * @version definition($Rev: 76724 $)/template($Rev: 67725 $)
- */
-public class InvalidSatCertException extends FaultException {
-
-
- /////////////////////////
- // Constructors
- /////////////////////////
- /**
- * Constructor
- */
- public InvalidSatCertException() {
- super(1024 , "invalidSatCert" , "Invalid Certificate");
- // begin member variable initialization
- }
-
- /**
- * Constructor
- * @param cause the cause (which is saved for later retrieval
- * by the Throwable.getCause() method). (A null value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- */
- public InvalidSatCertException(Throwable cause) {
- super(1024 , "invalidSatCert" , "Invalid Certificate" , cause);
- // begin member variable initialization
- }
-
- /////////////////////////
- // Getters/Setters
- /////////////////////////
-}
commit 603fa29e5d013306ab6ce9fbe4d5b0ea02964c24
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:02:44 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidPackageKeyException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidPackageKeyException.java
deleted file mode 100644
index 7d4d608..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidPackageKeyException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-package com.redhat.rhn.frontend.xmlrpc;
-
-import com.redhat.rhn.FaultException;
-import com.redhat.rhn.common.localization.LocalizationService;
-
-/**
- * Invalid Package Exception
- *
- * @version $Rev$
- */
-public class InvalidPackageKeyException extends FaultException {
-
- /**
- * Constructor
- * @param label the channel label that is duplicated
- */
- public InvalidPackageKeyException(String label) {
- super(2351, "invalidPackageKey" , LocalizationService.getInstance().
- getMessage("api.package.provider.invalidKey", new Object [] {label}));
- }
-
- /**
- * Constructor
- * @param label the channel label that is duplicated
- * @param cause the cause
- */
- public InvalidPackageKeyException(String label, Throwable cause) {
- super(2351, "invalidPackageKey" , LocalizationService.getInstance().
- getMessage("api.package.provider.invalidKey", new Object [] {label}),
- cause);
- }
-
-}
commit 58f9a3b4eb4e51a012e3e36803be9e0e7d0359b1
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:02:37 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidIpRangeException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidIpRangeException.java
deleted file mode 100644
index 21205a3..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/InvalidIpRangeException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-package com.redhat.rhn.frontend.xmlrpc;
-
-import com.redhat.rhn.FaultException;
-import com.redhat.rhn.common.localization.LocalizationService;
-
-/**
- * Invalid Package Exception
- *
- * @version $Rev$
- */
-public class InvalidIpRangeException extends FaultException {
-
- /**
- * Constructor
- * @param range reason the system couldn't be subscribed
- */
- public InvalidIpRangeException(String range) {
- super(2786, "ipRange" , LocalizationService.getInstance().
- getMessage("api.kickstart.iprange.invalid",
- new Object [] {range}));
- }
-
- /**
- * Constructor
- * @param range reason the system couldn't be subscribed
- * @param cause the cause
- */
- public InvalidIpRangeException(String range, Throwable cause) {
- super(2786, "ipRange" , LocalizationService.getInstance().
- getMessage("api.kickstart.iprange.invalid",
- new Object [] {range}), cause);
- }
-
-}
commit 3af5354b56a27c3093c7795fb91062b1418eaacf
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 13:00:37 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/ImportFileConfirmSubmitAction.java b/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/ImportFileConfirmSubmitAction.java
deleted file mode 100644
index 11b57d6..0000000
--- a/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/ImportFileConfirmSubmitAction.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.action.configuration.sdc;
-
-import com.redhat.rhn.common.util.DatePicker;
-import com.redhat.rhn.domain.action.config.ConfigUploadAction;
-import com.redhat.rhn.domain.config.ConfigChannel;
-import com.redhat.rhn.domain.rhnset.RhnSet;
-import com.redhat.rhn.domain.rhnset.RhnSetElement;
-import com.redhat.rhn.domain.server.Server;
-import com.redhat.rhn.domain.user.User;
-import com.redhat.rhn.frontend.struts.RequestContext;
-import com.redhat.rhn.frontend.struts.RhnListDispatchAction;
-import com.redhat.rhn.manager.action.ActionManager;
-import com.redhat.rhn.manager.rhnset.RhnSetDecl;
-import com.redhat.rhn.manager.rhnset.RhnSetManager;
-
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionForward;
-import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.ActionMessage;
-import org.apache.struts.action.ActionMessages;
-import org.apache.struts.action.DynaActionForm;
-
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-
-/**
- * ImportFileConfirmSubmitAction, for sdc configuration
- * @version $Rev$
- */
-public class ImportFileConfirmSubmitAction extends RhnListDispatchAction {
-
- /**
- * {@inheritDoc}
- */
- protected void processMethodKeys(Map map) {
- map.put("sdcimportconfirm.jsp.confirm", "confirm");
- }
-
- /**
- * {@inheritDoc}
- */
- protected void processParamMap(ActionForm formIn, HttpServletRequest request,
- Map params) {
- params.put("sid", request.getParameter("sid"));
- getStrutsDelegate().rememberDatePicker(params, (DynaActionForm)formIn,
- "date", DatePicker.YEAR_RANGE_POSITIVE);
- }
-
- /**
- * Actually schedules the config upload action.
- * @param mapping struts ActionMapping
- * @param formIn struts ActionForm
- * @param request HttpServletRequest
- * @param response HttpServletResponse
- * @return A Forward to the managed files page
- */
- public ActionForward confirm(ActionMapping mapping, ActionForm formIn,
- HttpServletRequest request, HttpServletResponse response) {
- RequestContext ctxt = new RequestContext(request);
- User user = ctxt.getLoggedInUser();
- Server server = ctxt.lookupServer();
-
- //The set of config file names to add to the action.
- RhnSet set = RhnSetDecl.CONFIG_IMPORT_FILE_NAMES.get(user);
-
- //We currently have a set of RhnSetElements, but we need a set
- //of Longs, this does that conversion.
- Set cfnids = new HashSet();
- Iterator i = set.getElements().iterator();
- while (i.hasNext()) {
- cfnids.add(((RhnSetElement)i.next()).getElement());
- }
-
- //The channel to which files will be uploaded
- ConfigChannel sandbox = server.getSandboxOverride();
- //The earliest time to perform the action.
- Date earliest = getStrutsDelegate().readDatePicker((DynaActionForm)formIn,
- "date", DatePicker.YEAR_RANGE_POSITIVE);
- ConfigUploadAction upload = (ConfigUploadAction)ActionManager
- .createConfigUploadAction(user, cfnids, server, sandbox, earliest);
-
- //clear the set, we are done with it.
- RhnSetManager.remove(set);
-
- //Create a success message
- if (upload != null) {
- ActionMessages msgs = new ActionMessages();
- Object[] params = new Object[2];
- params[0] = new Long(upload.getRhnActionConfigFileName().size());
- params[1] = "/rhn/schedule/ActionDetails.do?aid=" + upload.getId();
- msgs.add(ActionMessages.GLOBAL_MESSAGE,
- new ActionMessage("config.import.success", params));
- getStrutsDelegate().saveMessages(request, msgs);
- }
-
- return getStrutsDelegate().forwardParams(
- mapping.findForward("success"), makeParamMap(formIn, request));
- }
-
-}
commit f0f0fe02c6cbf716a3a29a01ad1e55092a4c0639
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 12:59:29 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/DuplicatePackageKeyException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/DuplicatePackageKeyException.java
deleted file mode 100644
index 5801698..0000000
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/DuplicatePackageKeyException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-package com.redhat.rhn.frontend.xmlrpc;
-
-import com.redhat.rhn.FaultException;
-import com.redhat.rhn.common.localization.LocalizationService;
-
-/**
- * Invalid Package Exception
- *
- * @version $Rev$
- */
-public class DuplicatePackageKeyException extends FaultException {
-
- /**
- * Constructor
- * @param label the channel label that is duplicated
- */
- public DuplicatePackageKeyException(String label) {
- super(2352, "duplicatePackageKey" , LocalizationService.getInstance().
- getMessage("api.package.provider.duplicateKey", new Object [] {label}));
- }
-
- /**
- * Constructor
- * @param label the channel label that is duplicated
- * @param cause the cause
- */
- public DuplicatePackageKeyException(String label, Throwable cause) {
- super(2352, "duplicatePackageKey" , LocalizationService.getInstance().
- getMessage("api.package.provider.duplicateKey", new Object [] {label}),
- cause);
- }
-
-}
commit 4078e29a82842b637658ba2fa6fc015eade922d3
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 12:58:24 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/CommandParameterValue.java b/java/code/src/com/redhat/rhn/frontend/dto/CommandParameterValue.java
deleted file mode 100644
index edb711d..0000000
--- a/java/code/src/com/redhat/rhn/frontend/dto/CommandParameterValue.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.dto;
-
-import com.redhat.rhn.domain.monitoring.command.CommandParameter;
-
-/**
- * Simple DTO to wrap a com.redhat.rhn.domain.monitoring.command.CommandParameter
- * and the value used by the ServerProbe
- *
- * @version $Rev: 50942 $
- */
-public class CommandParameterValue {
-
- private CommandParameter commandParameter;
- private String value;
-
- /**
- * Create an instance with default values
- * @param paramIn param to use
- * @param valueIn to be used
- */
- public CommandParameterValue(CommandParameter paramIn, String valueIn) {
- super();
- this.commandParameter = paramIn;
- this.value = valueIn;
- }
-
- /**
- * @return Returns the commandParameter.
- */
- public CommandParameter getCommandParameter() {
- return commandParameter;
- }
- /**
- * @param commandParameterIn The commandParameter to set.
- */
- public void setCommandParameter(CommandParameter commandParameterIn) {
- this.commandParameter = commandParameterIn;
- }
-
- /**
- * @return Returns the value.
- */
- public String getValue() {
- return value;
- }
- /**
- * @param valueIn The value to set.
- */
- public void setValue(String valueIn) {
- this.value = valueIn;
- }
-}
commit 7d1fa397fdb54cd7c9856cc9af19df4275d0a143
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 12:12:16 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/domain/common/ChecksumTypeException.java b/java/code/src/com/redhat/rhn/domain/common/ChecksumTypeException.java
deleted file mode 100644
index a97a33a..0000000
--- a/java/code/src/com/redhat/rhn/domain/common/ChecksumTypeException.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-
-package com.redhat.rhn.domain.common;
-
-/**
- * Indicates ChecksumType is not in database. We probably do not know how to
- * handle such checkum
- *
- */
-public class ChecksumTypeException extends Exception {
-
-
- /////////////////////////
- // Constructors
- /////////////////////////
- /**
- * Constructor
- * @param message exception message
- */
- public ChecksumTypeException(String message) {
- super(message);
- // begin member variable initialization
- }
-
- /**
- * Constructor
- * @param message exception message
- * @param cause the cause (which is saved for later retrieval
- * by the Throwable.getCause() method). (A null value is
- * permitted, and indicates that the cause is nonexistent or
- * unknown.)
- */
- public ChecksumTypeException(String message , Throwable cause) {
- super(message, cause);
- // begin member variable initialization
- }
-
- /////////////////////////
- // Getters/Setters
- /////////////////////////
-}
commit 5efae55cc86bc7705c1c69f1bb5ea61cb240876d
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 29 12:11:44 2012 +0100
removing dead code
diff --git a/java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceFactory.java b/java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceFactory.java
index 1632fd7..55bca7c 100644
--- a/java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceFactory.java
+++ b/java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceFactory.java
@@ -56,9 +56,6 @@ public class AuthenticationServiceFactory {
* Returns an AuthenticationService object. The implementation uses PXT authentication.
*
* @return An {@link AuthenticationService} object.
- *
- * @throws AuthenticationServiceInitializationException if an error occurs initializing
- * the AuthenticationService instance.
*/
public AuthenticationService getAuthenticationService() {
return getPxtService();
diff --git a/java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceInitializationException.java b/java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceInitializationException.java
deleted file mode 100644
index f0d1e33..0000000
--- a/java/code/src/com/redhat/rhn/frontend/security/AuthenticationServiceInitializationException.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2009--2010 Red Hat, Inc.
- *
- * This software is licensed to you under the GNU General Public License,
- * version 2 (GPLv2). There is NO WARRANTY for this software, express or
- * implied, including the implied warranties of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
- * along with this software; if not, see
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
- *
- * Red Hat trademarks are not licensed under GPLv2. No permission is
- * granted to use or replicate Red Hat trademarks that are incorporated
- * in this software or its documentation.
- */
-package com.redhat.rhn.frontend.security;
-
-import com.redhat.rhn.common.RhnRuntimeException;
-
-
-/**
- * Throw to indicate that a problem occurred while initializing an AuthenticationService
- * object. When this exception is throw, the AuthenticationService object may not be in a
- * usable state.
- *
- * @version $Rev$
- */
-public class AuthenticationServiceInitializationException extends RhnRuntimeException {
-
- /**
- *
- */
- public AuthenticationServiceInitializationException() {
- }
-
- /**
- * @param msg The detail message
- */
- public AuthenticationServiceInitializationException(String msg) {
- super(msg);
- }
-
- /**
- * @param cause The casue
- */
- public AuthenticationServiceInitializationException(Throwable cause) {
- super(cause);
- }
-
- /**
- * @param msg The detail message
- * @param cause The cause
- */
- public AuthenticationServiceInitializationException(String msg, Throwable cause) {
- super(msg, cause);
- }
-
-}
11 years, 3 months
Changes to 'refs/tags/spacewalk-schema-1.7.50-1'
by Milan Zazrivec
Tag 'spacewalk-schema-1.7.50-1' created by Milan Zazrivec <mzazrivec(a)redhat.com> at 2012-02-29 17:05 +0000
Tagging package [spacewalk-schema] version [1.7.50-1] in directory [schema/spacewalk/].
Changes since osad-5.10.39-1:
Milan Zazrivec (7):
use autonomous_transaction for insert only
use pg_dblink_exec to execute insert inside lookup_xccdf_benchmark
lookup_xccdf_benchmark: schema upgrade
use autonomous_transaction for insert only
use pg_dblink_exec to execute inserts inside lookup_xccdf_ident
lookup_xccdf_ident: schema upgrade
Automatic commit of package [spacewalk-schema] release [1.7.50-1].
---
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/oracle/procs/insert_xccdf_benchmark.sql | 26 +++
schema/spacewalk/oracle/procs/insert_xccdf_ident.sql | 25 +++
schema/spacewalk/oracle/procs/insert_xccdf_ident_system.sql | 26 +++
schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql | 48 ++----
schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql | 76 +++++----
schema/spacewalk/oracle/procs/procs.deps | 7
schema/spacewalk/postgres/procs/insert_xccdf_benchmark.sql | 2
schema/spacewalk/postgres/procs/insert_xccdf_ident.sql | 2
schema/spacewalk/postgres/procs/insert_xccdf_ident_system.sql | 2
schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql | 52 +++---
schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql | 79 +++++-----
schema/spacewalk/postgres/procs/procs.deps | 4
schema/spacewalk/spacewalk-schema.spec | 12 +
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.oracle | 38 ++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.postgresql | 34 ++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.oracle | 69 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.postgresql | 50 ++++++
18 files changed, 437 insertions(+), 117 deletions(-)
---
11 years, 3 months
rel-eng/packages schema/spacewalk
by Milan Zazrivec
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 12 +++++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit c83aff3a2ff0e9a662d38091f9f2d9d9fa7a1668
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 18:05:44 2012 +0100
Automatic commit of package [spacewalk-schema] release [1.7.50-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index e0cd899..6681a8b 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.7.49-1 schema/spacewalk/
+1.7.50-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 4aecead..557368b 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -2,7 +2,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.7.49
+Version: 1.7.50
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -66,6 +66,16 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Wed Feb 29 2012 Milan Zazrivec <mzazrivec(a)redhat.com> 1.7.50-1
+- lookup_xccdf_ident: schema upgrade (mzazrivec(a)redhat.com)
+- use pg_dblink_exec to execute inserts inside lookup_xccdf_ident
+ (mzazrivec(a)redhat.com)
+- use autonomous_transaction for insert only (mzazrivec(a)redhat.com)
+- lookup_xccdf_benchmark: schema upgrade (mzazrivec(a)redhat.com)
+- use pg_dblink_exec to execute insert inside lookup_xccdf_benchmark
+ (mzazrivec(a)redhat.com)
+- use autonomous_transaction for insert only (mzazrivec(a)redhat.com)
+
* Wed Feb 29 2012 Jan Pazdziora 1.7.49-1
- Need to stop blend from attempting to expanding the \i dblink.sql in build
time.
11 years, 3 months
3 commits - schema/spacewalk
by Milan Zazrivec
schema/spacewalk/oracle/procs/insert_xccdf_ident.sql | 25 +++
schema/spacewalk/oracle/procs/insert_xccdf_ident_system.sql | 26 +++
schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql | 76 +++++----
schema/spacewalk/oracle/procs/procs.deps | 5
schema/spacewalk/postgres/procs/insert_xccdf_ident.sql | 2
schema/spacewalk/postgres/procs/insert_xccdf_ident_system.sql | 2
schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql | 79 +++++-----
schema/spacewalk/postgres/procs/procs.deps | 3
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.oracle | 69 ++++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.postgresql | 50 ++++++
10 files changed, 269 insertions(+), 68 deletions(-)
New commits:
commit e54c598dd63c30249ab57ccc2a9e47e45ac67ba0
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 18:04:24 2012 +0100
lookup_xccdf_ident: schema upgrade
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.oracle
new file mode 100644
index 0000000..8862f3b
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.oracle
@@ -0,0 +1,69 @@
+create or replace function insert_xccdf_ident_system(system_in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ ident_sys_id number;
+begin
+ insert into rhnXccdfIdentSystem (id, system)
+ values (rhn_xccdf_identsytem_id_seq.nextval, system_in) returning id into ident_sys_id;
+ commit;
+ return ident_sys_id;
+end;
+/
+show errors
+
+create or replace function insert_xccdf_ident(ident_sys_id number, identifier_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ xccdf_ident_id number;
+begin
+ insert into rhnXccdfIdent (id, identsystem_id, identifier)
+ values (rhn_xccdf_ident_id_seq.nextval, ident_sys_id, identifier_in) returning id into xccdf_ident_id;
+ commit;
+ return xccdf_ident_id;
+end;
+/
+
+create or replace function
+lookup_xccdf_ident(system_in in varchar2, identifier_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ xccdf_ident_id number;
+ ident_sys_id number;
+begin
+ begin
+ select id
+ into ident_sys_id
+ from rhnXccdfIdentSystem
+ where system = system_in;
+ exception when no_data_found then
+ begin
+ ident_sys_id := insert_xccdf_ident_system(system_in);
+ exception when dup_val_on_index then
+ select id
+ into ident_sys_id
+ from rhnXccdfIdentSystem
+ where system = system_in;
+ end;
+ end;
+
+ select id
+ into xccdf_ident_id
+ from rhnXccdfIdent
+ where identsystem_id = ident_sys_id and identifier = identifier_in;
+ return xccdf_ident_id;
+exception when no_data_found then
+ begin
+ xccdf_ident_id := insert_xccdf_ident(ident_sys_id, identifier_in);
+ exception when dup_val_on_index then
+ select id
+ into xccdf_ident_id
+ from rhnXccdfIdent
+ where identsystem_id = ident_sys_id and identifier = identifier_in;
+ end;
+ return xccdf_ident_id;
+end lookup_xccdf_ident;
+/
+show errors
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.postgresql
new file mode 100644
index 0000000..aae5a97
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/107-lookup_xccdf_ident.sql.postgresql
@@ -0,0 +1,50 @@
+-- oracle equivalent source sha1 32fa76082aad7e0505467f86e5ed19f5586debe0
+
+create or replace function
+lookup_xccdf_ident(system_in in varchar, identifier_in in varchar)
+returns numeric
+as
+$$
+declare
+ xccdf_ident_id numeric;
+ ident_sys_id numeric;
+begin
+ select id
+ into ident_sys_id
+ from rhnXccdfIdentSystem
+ where system = system_in;
+ if not found then
+ ident_sys_id := nextval('rhn_xccdf_identsytem_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnXccdfIdentSystem (id, system) values (' ||
+ ident_sys_id || ', ' || coalesce(quote_literal(system_in)) || ')');
+ exception when unique_violation then
+ select id
+ into strict ident_sys_id
+ from rhnXccdfIdentSystem
+ where system = system_in;
+ end;
+ end if;
+
+ select id
+ into xccdf_ident_id
+ from rhnXccdfIdent
+ where identsystem_id = ident_sys_id and identifier = identifier_in;
+ if not found then
+ xccdf_ident_id := nextval('rhn_xccdf_ident_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnXccdfIdent (id, identsystem_id, identifier) values (' ||
+ xccdf_ident_id || ', ' || ident_sys_id || ', ' ||
+ coalesce(quote_literal( identifier_in)) || ')');
+ exception when unique_violation then
+ select id
+ into strict xccdf_ident_id
+ from rhnXccdfIdent
+ where identsystem_id = ident_sys_id and identifier = identifier_in;
+ end;
+ end if;
+ return xccdf_ident_id;
+end;
+$$ language plpgsql immutable;
commit 5c3f958f4bbba92f9e77d963ad60c557202fb861
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 18:00:37 2012 +0100
use pg_dblink_exec to execute inserts inside lookup_xccdf_ident
diff --git a/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql b/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql
index fd82742..3b1ce10 100644
--- a/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql
+++ b/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql
@@ -12,37 +12,52 @@
-- Red Hat trademarks are not licensed under GPLv2. No permission is
-- granted to use or replicate Red Hat trademarks that are incorporated
-- in this software or its documentation.
---
-CREATE OR REPLACE FUNCTION
-lookup_xccdf_ident(system_in IN VARCHAR, identifier_in IN VARCHAR)
-RETURNS NUMERIC
-AS
+create or replace function
+lookup_xccdf_ident(system_in in varchar, identifier_in in varchar)
+returns numeric
+as
$$
-DECLARE
- xccdf_ident_id NUMERIC;
- ident_sys_id NUMERIC;
-BEGIN
- SELECT id
- INTO ident_sys_id
- FROM rhnXccdfIdentsystem
- WHERE system = system_in;
- IF NOT FOUND THEN
- INSERT INTO rhnXccdfIdentsystem (id, system)
- VALUES (nextval('rhn_xccdf_identsytem_id_seq'), system_in)
- RETURNING id INTO ident_sys_id;
- END IF;
+declare
+ xccdf_ident_id numeric;
+ ident_sys_id numeric;
+begin
+ select id
+ into ident_sys_id
+ from rhnXccdfIdentSystem
+ where system = system_in;
+ if not found then
+ ident_sys_id := nextval('rhn_xccdf_identsytem_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnXccdfIdentSystem (id, system) values (' ||
+ ident_sys_id || ', ' || coalesce(quote_literal(system_in)) || ')');
+ exception when unique_violation then
+ select id
+ into strict ident_sys_id
+ from rhnXccdfIdentSystem
+ where system = system_in;
+ end;
+ end if;
- SELECT id
- INTO xccdf_ident_id
- FROM rhnXccdfIdent
- WHERE identsystem_id = ident_sys_id
- AND identifier = identifier_in;
- IF NOT FOUND THEN
- INSERT INTO rhnXccdfIdent (id, identsystem_id, identifier)
- VALUES (nextval('rhn_xccdf_ident_id_seq'), ident_sys_id, identifier_in)
- RETURNING id INTO xccdf_ident_id;
- END IF;
- RETURN xccdf_ident_id;
-END;
-$$ LANGUAGE PLPGSQL;
+ select id
+ into xccdf_ident_id
+ from rhnXccdfIdent
+ where identsystem_id = ident_sys_id and identifier = identifier_in;
+ if not found then
+ xccdf_ident_id := nextval('rhn_xccdf_ident_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnXccdfIdent (id, identsystem_id, identifier) values (' ||
+ xccdf_ident_id || ', ' || ident_sys_id || ', ' ||
+ coalesce(quote_literal( identifier_in)) || ')');
+ exception when unique_violation then
+ select id
+ into strict xccdf_ident_id
+ from rhnXccdfIdent
+ where identsystem_id = ident_sys_id and identifier = identifier_in;
+ end;
+ end if;
+ return xccdf_ident_id;
+end;
+$$ language plpgsql immutable;
diff --git a/schema/spacewalk/postgres/procs/procs.deps b/schema/spacewalk/postgres/procs/procs.deps
index 6e8989a..bd5e893 100644
--- a/schema/spacewalk/postgres/procs/procs.deps
+++ b/schema/spacewalk/postgres/procs/procs.deps
@@ -105,6 +105,9 @@ lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
pg_dblink_exec
lookup_virt_sub_level :: rhnVirtSubLevel
lookup_xccdf_benchmark :: rhnXccdfBenchmark pg_dblink_exec
+lookup_xccdf_ident :: rhnXccdfIdentSystem \
+ rhnXccdfIdent \
+ pg_dblink_exec
pxt_session_cleanup :: PXTSessions
queue_server :: rhnServerNeededPackageCache rhnTaskQueue \
rhnServer \
commit 87a133c568f171bf8baf24a61c077e10b6f90ecd
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 17:53:15 2012 +0100
use autonomous_transaction for insert only
diff --git a/schema/spacewalk/oracle/procs/insert_xccdf_ident.sql b/schema/spacewalk/oracle/procs/insert_xccdf_ident.sql
new file mode 100644
index 0000000..83c9a84
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/insert_xccdf_ident.sql
@@ -0,0 +1,25 @@
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+
+create or replace function insert_xccdf_ident(ident_sys_id number, identifier_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ xccdf_ident_id number;
+begin
+ insert into rhnXccdfIdent (id, identsystem_id, identifier)
+ values (rhn_xccdf_ident_id_seq.nextval, ident_sys_id, identifier_in) returning id into xccdf_ident_id;
+ commit;
+ return xccdf_ident_id;
+end;
+/
diff --git a/schema/spacewalk/oracle/procs/insert_xccdf_ident_system.sql b/schema/spacewalk/oracle/procs/insert_xccdf_ident_system.sql
new file mode 100644
index 0000000..2463311
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/insert_xccdf_ident_system.sql
@@ -0,0 +1,26 @@
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+
+create or replace function insert_xccdf_ident_system(system_in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ ident_sys_id number;
+begin
+ insert into rhnXccdfIdentSystem (id, system)
+ values (rhn_xccdf_identsytem_id_seq.nextval, system_in) returning id into ident_sys_id;
+ commit;
+ return ident_sys_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql b/schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql
index c63af38..0adb322 100644
--- a/schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql
+++ b/schema/spacewalk/oracle/procs/lookup_xccdf_ident.sql
@@ -1,4 +1,3 @@
---
-- Copyright (c) 2012 Red Hat, Inc.
--
-- This software is licensed to you under the GNU General Public License,
@@ -11,41 +10,46 @@
-- Red Hat trademarks are not licensed under GPLv2. No permission is
-- granted to use or replicate Red Hat trademarks that are incorporated
-- in this software or its documentation.
---
-CREATE OR REPLACE FUNCTION
-lookup_xccdf_ident(system_in IN VARCHAR2, identifier_in IN VARCHAR2)
-RETURN NUMBER
-IS
- PRAGMA AUTONOMOUS_TRANSACTION;
- xccdf_ident_id NUMBER;
- ident_sys_id NUMBER;
-BEGIN
- BEGIN
- SELECT id
- INTO ident_sys_id
- FROM rhnXccdfIdentsystem
- WHERE system = system_in;
- EXCEPTION
- WHEN NO_DATA_FOUND THEN
- INSERT INTO rhnXccdfIdentsystem (id, system)
- VALUES (rhn_xccdf_identsytem_id_seq.nextval, system_in)
- RETURNING id INTO ident_sys_id;
- END;
+create or replace function
+lookup_xccdf_ident(system_in in varchar2, identifier_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ xccdf_ident_id number;
+ ident_sys_id number;
+begin
+ begin
+ select id
+ into ident_sys_id
+ from rhnXccdfIdentSystem
+ where system = system_in;
+ exception when no_data_found then
+ begin
+ ident_sys_id := insert_xccdf_ident_system(system_in);
+ exception when dup_val_on_index then
+ select id
+ into ident_sys_id
+ from rhnXccdfIdentSystem
+ where system = system_in;
+ end;
+ end;
- SELECT id
- INTO xccdf_ident_id
- FROM rhnXccdfIdent
- WHERE identsystem_id = ident_sys_id
- AND identifier = identifier_in;
- RETURN xccdf_ident_id;
-EXCEPTION
- WHEN NO_DATA_FOUND THEN
- INSERT INTO rhnXccdfIdent (id, identsystem_id, identifier)
- VALUES (rhn_xccdf_ident_id_seq.nextval, ident_sys_id, identifier_in)
- RETURNING id INTO xccdf_ident_id;
- COMMIT;
- RETURN xccdf_ident_id;
-END lookup_xccdf_ident;
+ select id
+ into xccdf_ident_id
+ from rhnXccdfIdent
+ where identsystem_id = ident_sys_id and identifier = identifier_in;
+ return xccdf_ident_id;
+exception when no_data_found then
+ begin
+ xccdf_ident_id := insert_xccdf_ident(ident_sys_id, identifier_in);
+ exception when dup_val_on_index then
+ select id
+ into xccdf_ident_id
+ from rhnXccdfIdent
+ where identsystem_id = ident_sys_id and identifier = identifier_in;
+ end;
+ return xccdf_ident_id;
+end lookup_xccdf_ident;
/
-SHOW ERRORS
+show errors
diff --git a/schema/spacewalk/oracle/procs/procs.deps b/schema/spacewalk/oracle/procs/procs.deps
index 83314a3..b55f698 100644
--- a/schema/spacewalk/oracle/procs/procs.deps
+++ b/schema/spacewalk/oracle/procs/procs.deps
@@ -69,6 +69,7 @@ insert_tag :: rhnTag
insert_tag_name :: rhnTagName
insert_transaction_package :: rhnTransactionPackage
insert_xccdf_benchmark :: rhnXccdfBenchmark
+insert_xccdf_ident_system :: rhnXccdfIdentSystem
is_user_applicant :: rhnUserGroupType web_contact rhnUserGroup \
rhnUserGroupMembers
lookup_arch_type :: data/rhnArchType rhn_exception.pks
@@ -115,6 +116,10 @@ lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
insert_transaction_package
lookup_virt_sub_level :: rhnVirtSubLevel
lookup_xccdf_benchmark :: insert_xccdf_benchmark rhnXccdfBenchmark
+lookup_xccdf_ident :: insert_xccdf_ident \
+ insert_xccdf_ident_system \
+ rhnXccdfIdentSystem \
+ rhnXccdfIdent
pxt_session_cleanup :: PXTSessions
queue_server :: rhnServerNeededPackageCache rhnTaskQueue \
rhnServer \
diff --git a/schema/spacewalk/postgres/procs/insert_xccdf_ident.sql b/schema/spacewalk/postgres/procs/insert_xccdf_ident.sql
new file mode 100644
index 0000000..8aa16d2
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/insert_xccdf_ident.sql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 346f0f7fb2cfcff4b50d79095f640bfe64a4cf54
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/postgres/procs/insert_xccdf_ident_system.sql b/schema/spacewalk/postgres/procs/insert_xccdf_ident_system.sql
new file mode 100644
index 0000000..e941e8f
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/insert_xccdf_ident_system.sql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 ec9ba49c1f25d81a100625db72795bba81976913
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql b/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql
index 663f825..fd82742 100644
--- a/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql
+++ b/schema/spacewalk/postgres/procs/lookup_xccdf_ident.sql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 690bbd47c01d39c135da9a54dbaacb77f7f206bc
+-- oracle equivalent source sha1 cf499cee6f4107ee1ae27312cf1b92b8650333eb
--
-- Copyright (c) 2012 Red Hat, Inc.
--
11 years, 3 months
3 commits - schema/spacewalk
by Milan Zazrivec
schema/spacewalk/oracle/procs/insert_xccdf_benchmark.sql | 26 +++++
schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql | 48 ++++-----
schema/spacewalk/oracle/procs/procs.deps | 2
schema/spacewalk/postgres/procs/insert_xccdf_benchmark.sql | 2
schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql | 52 +++++-----
schema/spacewalk/postgres/procs/procs.deps | 1
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.oracle | 38 +++++++
schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.postgresql | 34 ++++++
8 files changed, 156 insertions(+), 47 deletions(-)
New commits:
commit 0ded4b65685a039710d04c2607ba6dc5e5d5814b
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 17:28:41 2012 +0100
lookup_xccdf_benchmark: schema upgrade
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.oracle
new file mode 100644
index 0000000..45c6c80
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.oracle
@@ -0,0 +1,38 @@
+create or replace function insert_xccdf_benchmark(identifier_in in varchar2, version_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ benchmark_id number;
+begin
+ insert into rhnXccdfBenchmark (id, identifier, version)
+ values (rhn_xccdf_benchmark_id_seq.nextval, identifier_in, version_in) returning id into benchmark_id;
+ commit;
+ return benchmark_id;
+end;
+/
+show errors
+
+create or replace function
+lookup_xccdf_benchmark(identifier_in in varchar2, version_in in varchar2)
+return number
+is
+ benchmark_id number;
+begin
+ select id
+ into benchmark_id
+ from rhnXccdfBenchmark
+ where identifier = identifier_in and version = version_in;
+ return benchmark_id;
+exception when no_data_found then
+ begin
+ benchmark_id := insert_xccdf_benchmark(identifier_in, version_in);
+ exception when dup_val_on_index then
+ select id
+ into benchmark_id
+ from rhnXccdfBenchmark
+ where identifier = identifier_in and version = version_in;
+ end;
+ return benchmark_id;
+end lookup_xccdf_benchmark;
+/
+show errors
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.postgresql
new file mode 100644
index 0000000..a042695
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.6-to-spacewalk-schema-1.7/106-lookup_xccdf_benchmark.sql.postgresql
@@ -0,0 +1,34 @@
+-- oracle equivalent source sha1 3dabe623b63fab475d78d78d1169b2b380f14655
+
+create or replace function
+lookup_xccdf_benchmark(identifier_in in varchar, version_in in varchar)
+returns numeric
+as
+$$
+declare
+ benchmark_id numeric;
+begin
+ select id
+ into benchmark_id
+ from rhnXccdfBenchmark
+ where identifier = identifier_in and version = version_in;
+
+ if not found then
+ benchmark_id := nextval('rhn_xccdf_benchmark_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnXccdfBenchmark (id, identifier, version) values (' ||
+ benchmark_id || ', ' ||
+ coalesce(quote_literal(identifier_in), 'NULL') || ', ' ||
+ coalesce(quote_literal(version_in), 'NULL') || ')');
+ exception when unique_violation then
+ select id
+ into strict benchmark_id
+ from rhnXccdfBenchmark
+ where identifier = identifier_in and version = version_in;
+ end;
+ end if;
+
+ return benchmark_id;
+end;
+$$ language plpgsql immutable;
commit 70974d5081e791d19f25782aecc0da18a899ff84
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 17:26:55 2012 +0100
use pg_dblink_exec to execute insert inside lookup_xccdf_benchmark
diff --git a/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql b/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql
index 8407454..0b168b2 100644
--- a/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql
+++ b/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql
@@ -14,27 +14,35 @@
-- in this software or its documentation.
--
-CREATE OR REPLACE FUNCTION
-lookup_xccdf_benchmark(identifier_in IN VARCHAR, version_in IN VARCHAR)
-RETURNS NUMERIC
-AS
+create or replace function
+lookup_xccdf_benchmark(identifier_in in varchar, version_in in varchar)
+returns numeric
+as
$$
-DECLARE
- benchmark_id NUMERIC;
-BEGIN
- SELECT id
- INTO benchmark_id
- FROM rhnXccdfBenchmark
- WHERE identifier = identifier_in
- AND version = version_in;
+declare
+ benchmark_id numeric;
+begin
+ select id
+ into benchmark_id
+ from rhnXccdfBenchmark
+ where identifier = identifier_in and version = version_in;
- IF NOT FOUND THEN
- INSERT INTO rhnXccdfBenchmark (id, identifier, version)
- VALUES (nextval('rhn_xccdf_benchmark_id_seq'),
- identifier_in, version_in)
- RETURNING id INTO benchmark_id;
- END IF;
+ if not found then
+ benchmark_id := nextval('rhn_xccdf_benchmark_id_seq');
+ begin
+ perform pg_dblink_exec(
+ 'insert into rhnXccdfBenchmark (id, identifier, version) values (' ||
+ benchmark_id || ', ' ||
+ coalesce(quote_literal(identifier_in), 'NULL') || ', ' ||
+ coalesce(quote_literal(version_in), 'NULL') || ')');
+ exception when unique_violation then
+ select id
+ into strict benchmark_id
+ from rhnXccdfBenchmark
+ where identifier = identifier_in and version = version_in;
+ end;
+ end if;
- RETURN benchmark_id;
-END;
-$$ LANGUAGE PLPGSQL;
+ return benchmark_id;
+end;
+$$ language plpgsql immutable;
diff --git a/schema/spacewalk/postgres/procs/procs.deps b/schema/spacewalk/postgres/procs/procs.deps
index 5fa70c3..6e8989a 100644
--- a/schema/spacewalk/postgres/procs/procs.deps
+++ b/schema/spacewalk/postgres/procs/procs.deps
@@ -104,6 +104,7 @@ lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
rhnTransactionPackage rhn_exception.pks \
pg_dblink_exec
lookup_virt_sub_level :: rhnVirtSubLevel
+lookup_xccdf_benchmark :: rhnXccdfBenchmark pg_dblink_exec
pxt_session_cleanup :: PXTSessions
queue_server :: rhnServerNeededPackageCache rhnTaskQueue \
rhnServer \
commit 6de2bc15684a36cd5efbcf75e0e8b9ee14595ad0
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Feb 29 17:21:17 2012 +0100
use autonomous_transaction for insert only
diff --git a/schema/spacewalk/oracle/procs/insert_xccdf_benchmark.sql b/schema/spacewalk/oracle/procs/insert_xccdf_benchmark.sql
new file mode 100644
index 0000000..8eefde0
--- /dev/null
+++ b/schema/spacewalk/oracle/procs/insert_xccdf_benchmark.sql
@@ -0,0 +1,26 @@
+-- Copyright (c) 2012 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+
+create or replace function insert_xccdf_benchmark(identifier_in in varchar2, version_in in varchar2)
+return number
+is
+ pragma autonomous_transaction;
+ benchmark_id number;
+begin
+ insert into rhnXccdfBenchmark (id, identifier, version)
+ values (rhn_xccdf_benchmark_id_seq.nextval, identifier_in, version_in) returning id into benchmark_id;
+ commit;
+ return benchmark_id;
+end;
+/
+show errors
diff --git a/schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql b/schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql
index 71addd5..e4a584a 100644
--- a/schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql
+++ b/schema/spacewalk/oracle/procs/lookup_xccdf_benchmark.sql
@@ -1,4 +1,3 @@
---
-- Copyright (c) 2012 Red Hat, Inc.
--
-- This software is licensed to you under the GNU General Public License,
@@ -11,29 +10,28 @@
-- Red Hat trademarks are not licensed under GPLv2. No permission is
-- granted to use or replicate Red Hat trademarks that are incorporated
-- in this software or its documentation.
---
-CREATE OR REPLACE FUNCTION
-lookup_xccdf_benchmark(identifier_in IN VARCHAR2, version_in IN VARCHAR2)
-RETURN NUMBER
-IS
- PRAGMA AUTONOMOUS_TRANSACTION;
- benchmark_id NUMBER;
-BEGIN
- SELECT id
- INTO benchmark_id
- FROM rhnXccdfBenchmark
- WHERE identifier = identifier_in
- AND version = version_in;
- RETURN benchmark_id;
-EXCEPTION
- WHEN NO_DATA_FOUND THEN
- INSERT INTO rhnXccdfBenchmark (id, identifier, version)
- VALUES (rhn_xccdf_benchmark_id_seq.nextval,
- identifier_in, version_in)
- RETURNING id INTO benchmark_id;
- COMMIT;
- RETURN benchmark_id;
-END lookup_xccdf_benchmark;
+create or replace function
+lookup_xccdf_benchmark(identifier_in in varchar2, version_in in varchar2)
+return number
+is
+ benchmark_id number;
+begin
+ select id
+ into benchmark_id
+ from rhnXccdfBenchmark
+ where identifier = identifier_in and version = version_in;
+ return benchmark_id;
+exception when no_data_found then
+ begin
+ benchmark_id := insert_xccdf_benchmark(identifier_in, version_in);
+ exception when dup_val_on_index then
+ select id
+ into benchmark_id
+ from rhnXccdfBenchmark
+ where identifier = identifier_in and version = version_in;
+ end;
+ return benchmark_id;
+end lookup_xccdf_benchmark;
/
-SHOW ERRORS
+show errors
diff --git a/schema/spacewalk/oracle/procs/procs.deps b/schema/spacewalk/oracle/procs/procs.deps
index 26c1676..83314a3 100644
--- a/schema/spacewalk/oracle/procs/procs.deps
+++ b/schema/spacewalk/oracle/procs/procs.deps
@@ -68,6 +68,7 @@ insert_source_name :: rhnSourceRPM
insert_tag :: rhnTag
insert_tag_name :: rhnTagName
insert_transaction_package :: rhnTransactionPackage
+insert_xccdf_benchmark :: rhnXccdfBenchmark
is_user_applicant :: rhnUserGroupType web_contact rhnUserGroup \
rhnUserGroupMembers
lookup_arch_type :: data/rhnArchType rhn_exception.pks
@@ -113,6 +114,7 @@ lookup_transaction_package :: rhnTransactionOperation lookup_package_name \
rhnTransactionPackage rhn_exception.pks \
insert_transaction_package
lookup_virt_sub_level :: rhnVirtSubLevel
+lookup_xccdf_benchmark :: insert_xccdf_benchmark rhnXccdfBenchmark
pxt_session_cleanup :: PXTSessions
queue_server :: rhnServerNeededPackageCache rhnTaskQueue \
rhnServer \
diff --git a/schema/spacewalk/postgres/procs/insert_xccdf_benchmark.sql b/schema/spacewalk/postgres/procs/insert_xccdf_benchmark.sql
new file mode 100644
index 0000000..377d76b
--- /dev/null
+++ b/schema/spacewalk/postgres/procs/insert_xccdf_benchmark.sql
@@ -0,0 +1,2 @@
+-- oracle equivalent source sha1 4202a766e12fa3137a822d20683ccabe897631a1
+-- This file is intentionally left empty.
diff --git a/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql b/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql
index cb89ba0..8407454 100644
--- a/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql
+++ b/schema/spacewalk/postgres/procs/lookup_xccdf_benchmark.sql
@@ -1,4 +1,4 @@
--- oracle equivalent source sha1 85e65cbb76b55a91cae4f2103f5c95b4785062e0
+-- oracle equivalent source sha1 9491baee899b1ae99ac039939eed51f7b5bc0342
--
-- Copyright (c) 2012 Red Hat, Inc.
--
11 years, 3 months
Changes to 'refs/tags/osad-5.10.39-1'
by Miroslav Suchý
Tag 'osad-5.10.39-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2012-02-29 16:11 +0000
Tagging package [osad] version [5.10.39-1] in directory [client/tools/osad/].
Changes since spacewalk-schema-1.7.49-1:
Miroslav Suchý (7):
add logrotate for /var/log/osad and own this file (as ghost)
mark log file osa-dispatcher.log as ghost owned
fix typo in description
/etc/rhn/tns_admin/osa-dispatcher is directory, not config file
by default log to /var/log/osad
log file may contain password, set chmod to 600
Automatic commit of package [osad] release [5.10.39-1].
---
client/tools/osad/logrotate/Makefile | 2 +-
client/tools/osad/logrotate/osad | 9 +++++++++
client/tools/osad/osad.spec | 22 ++++++++++++++++++----
client/tools/osad/src/rhn_log.py | 3 ++-
rel-eng/packages/osad | 2 +-
5 files changed, 31 insertions(+), 7 deletions(-)
---
11 years, 3 months