java/code/src/com/redhat/rhn/domain/server/PushDispatcher.hbm.xml | 23 -
java/code/src/com/redhat/rhn/domain/server/PushDispatcher.java | 148
----------
java/code/src/com/redhat/rhn/domain/server/test/PushDispatcherTest.java | 88 -----
3 files changed, 259 deletions(-)
New commits:
commit 4a773ff5a7174936fe1073333ed3de18bd169fd7
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Fri Sep 27 11:30:30 2013 +0200
Orphaned class PushDispatcher removed
diff --git a/java/code/src/com/redhat/rhn/domain/server/PushDispatcher.hbm.xml
b/java/code/src/com/redhat/rhn/domain/server/PushDispatcher.hbm.xml
deleted file mode 100644
index 5e45804..0000000
--- a/java/code/src/com/redhat/rhn/domain/server/PushDispatcher.hbm.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE hibernate-mapping
- PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "classpath://org/hibernate/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping>
- <class name="com.redhat.rhn.domain.server.PushDispatcher"
- table="rhnpushdispatcher" >
- <id name="id" type="long" column="ID">
- <meta attribute="scope-set">protected</meta>
- <generator class="sequence">
- <param name="sequence">rhn_pclient_id_seq</param>
- </generator>
- </id>
- <property name="jabberId" column="JABBER_ID"
type="string" length="512"/>
- <property name="hostname" column="HOSTNAME"
type="string" length="1024"/>
- <property name="port" column="PORT"
type="integer"/>
- <property name="lastCheckin" column="LAST_CHECKIN"
type="timestamp"/>
- <property name="created" column="CREATED"
type="timestamp"
- insert="false" update="false"/>
- <property name="modified" column="MODIFIED"
type="timestamp"
- insert="false" update="false"/>
- </class>
-</hibernate-mapping>
diff --git a/java/code/src/com/redhat/rhn/domain/server/PushDispatcher.java
b/java/code/src/com/redhat/rhn/domain/server/PushDispatcher.java
deleted file mode 100644
index 986a4bb..0000000
--- a/java/code/src/com/redhat/rhn/domain/server/PushDispatcher.java
+++ /dev/null
@@ -1,148 +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.server;
-
-import java.util.Date;
-
-/**
- * PushDispatcher - Class representation of the rhnPushDispatcher table.
- * Contains data used to connect to the osa-dispatcher and trigger a push
- * to clients.
- *
- * @version $Rev$
- */
-public class PushDispatcher {
-
- private Long id;
- private String jabberId;
- private String hostname;
- private Integer port;
- private Date lastCheckin;
- private Date created;
- private Date modified;
-
- /**
- * Getter for created
- * @return Date to get
- */
- public Date getCreated() {
- return created;
- }
-
- /**
- * Setter for created
- * @param createdIn to set
- */
- public void setCreated(Date createdIn) {
- this.created = createdIn;
- }
-
- /**
- * Getter for hostname
- * @return String to get
- */
- public String getHostname() {
- return hostname;
- }
-
- /**
- * Setter for hostname
- * @param hostnameIn to set
- */
- public void setHostname(String hostnameIn) {
- this.hostname = hostnameIn;
- }
-
- /**
- * Getter for id
- * @return Long to get
- */
- public Long getId() {
- return id;
- }
-
- /**
- * Setter for id
- * @param idIn to set
- */
- public void setId(Long idIn) {
- this.id = idIn;
- }
-
- /**
- * Getter for jabberId
- * @return String to get
- */
- public String getJabberId() {
- return jabberId;
- }
-
- /**
- * Setter for jabberId
- * @param jabberIdIn to set
- */
- public void setJabberId(String jabberIdIn) {
- this.jabberId = jabberIdIn;
- }
-
- /**
- * Getter for lastCheckin
- * @return Date to get
- */
- public Date getLastCheckin() {
- return lastCheckin;
- }
-
- /**
- * Setter for lastCheckin
- * @param lastCheckinIn to set
- */
- public void setLastCheckin(Date lastCheckinIn) {
- this.lastCheckin = lastCheckinIn;
- }
-
- /**
- * Getter for modified
- * @return Date to get
- */
- public Date getModified() {
- return modified;
- }
-
- /**
- * Setter for modified
- * @param modifiedIn to set
- */
- public void setModified(Date modifiedIn) {
- this.modified = modifiedIn;
- }
-
- /**
- * Getter for port
- * @return Integer to get
- */
- public Integer getPort() {
- return port;
- }
-
- /**
- * Setter for port
- * @param portIn to set
- */
- public void setPort(Integer portIn) {
- this.port = portIn;
- }
-
-}
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/PushDispatcherTest.java
b/java/code/src/com/redhat/rhn/domain/server/test/PushDispatcherTest.java
deleted file mode 100644
index 87f860e..0000000
--- a/java/code/src/com/redhat/rhn/domain/server/test/PushDispatcherTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2009--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.
- */
-package com.redhat.rhn.domain.server.test;
-
-import com.redhat.rhn.common.hibernate.HibernateFactory;
-import com.redhat.rhn.domain.server.PushDispatcher;
-import com.redhat.rhn.testing.RhnBaseTestCase;
-import com.redhat.rhn.testing.TestUtils;
-
-import org.hibernate.HibernateException;
-
-import java.util.Date;
-
-public class PushDispatcherTest extends RhnBaseTestCase {
-
- private static final String JABBER_ID = "Test Jabber ID";
- private static final String JABBER_ID_NEW = "Another Test Jabber ID";
- private static final Date LAST_CHECKIN = new Date();
- private static final String HOSTNAME = "test.hostname.com";
- private static final Integer PORT = new Integer(1290);
-
- private PushDispatcher original;
-
- public void setUp() throws Exception {
- super.setUp();
-
- original = createPushDispatcher();
- }
-
- public void testCreatePushDispatcher() throws Exception {
- PushDispatcher lookupDispatcher = (PushDispatcher) TestUtils
- .lookupTestObject("from PushDispatcher where id = " +
- original.getId().toString());
-
- assertEquals(JABBER_ID, lookupDispatcher.getJabberId());
- assertEquals(LAST_CHECKIN, lookupDispatcher.getLastCheckin());
- assertEquals(HOSTNAME, lookupDispatcher.getHostname());
- assertEquals(PORT, lookupDispatcher.getPort());
- }
-
- public void testUpdatePushDispatcher() throws Exception {
- PushDispatcher lookupDispatcher = (PushDispatcher) TestUtils
- .lookupTestObject("from PushDispatcher where id = " +
- original.getId().toString());
- lookupDispatcher.setJabberId(JABBER_ID_NEW);
- TestUtils.saveAndFlush(original);
-
- lookupDispatcher = (PushDispatcher) TestUtils
- .lookupTestObject("from PushDispatcher where id = " +
- original.getId().toString());
- assertEquals(JABBER_ID_NEW, lookupDispatcher.getJabberId());
- }
-
- public void testDeletePushDispatcher() throws Exception {
- TestUtils.removeObject(original);
- assertNull(TestUtils.lookupTestObject("from PushDispatcher where id = "
+
- original.getId().toString()));
- }
-
- private PushDispatcher createPushDispatcher() {
- try {
- PushDispatcher dispatcher = new PushDispatcher();
- dispatcher.setJabberId(JABBER_ID);
- dispatcher.setLastCheckin(LAST_CHECKIN);
- dispatcher.setHostname(HOSTNAME);
- dispatcher.setPort(PORT);
-
- TestUtils.saveAndFlush(dispatcher);
- return dispatcher;
- }
- catch (HibernateException e) {
- HibernateFactory.rollbackTransaction();
- }
- return null;
- }
-}