[jboss-cvs] JBossAS SVN: r84873 - trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 27 10:23:51 EST 2009


Author: emuckenhuber
Date: 2009-02-27 10:23:51 -0500 (Fri, 27 Feb 2009)
New Revision: 84873

Added:
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/AbstractPersisitedValue.java
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/ModificationInfo.java
Modified:
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedCollectionValue.java
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedCompositeValue.java
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedGenericValue.java
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedSimpleValue.java
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedTableValue.java
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedValue.java
Log:
[JBAS-6227] introduce a modification info to the persisted values.

Added: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/AbstractPersisitedValue.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/AbstractPersisitedValue.java	                        (rev 0)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/AbstractPersisitedValue.java	2009-02-27 15:23:51 UTC (rev 84873)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */ 
+package org.jboss.system.server.profileservice.persistence.xml;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * 
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public abstract class AbstractPersisitedValue extends AbstractElement implements PersistedValue
+{
+   /** The modification info. */
+   ModificationInfo info;
+   
+   @XmlAttribute(name = "modification")
+   public ModificationInfo getModificationInfo()
+   {
+      return this.info;
+   }
+   
+   public void setModificationInfo(ModificationInfo info)
+   {
+      this.info = info;
+   }
+   
+}

Added: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/ModificationInfo.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/ModificationInfo.java	                        (rev 0)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/ModificationInfo.java	2009-02-27 15:23:51 UTC (rev 84873)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */ 
+package org.jboss.system.server.profileservice.persistence.xml;
+
+import javax.xml.bind.annotation.XmlEnum;
+
+/**
+ * Flag indicating the modification of a value.
+ * 
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+ at XmlEnum
+public enum ModificationInfo {
+
+   ADDED,
+   MODIFIED,
+   REMOVED
+   
+}
+

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedCollectionValue.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedCollectionValue.java	2009-02-27 15:17:21 UTC (rev 84872)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedCollectionValue.java	2009-02-27 15:23:51 UTC (rev 84873)
@@ -33,7 +33,7 @@
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class PersistedCollectionValue extends AbstractElement implements PersistedValue
+public class PersistedCollectionValue extends AbstractPersisitedValue implements PersistedValue
 {
    /** The values. */
    private List<PersistedValue> values = new ArrayList<PersistedValue>();

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedCompositeValue.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedCompositeValue.java	2009-02-27 15:17:21 UTC (rev 84872)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedCompositeValue.java	2009-02-27 15:23:51 UTC (rev 84873)
@@ -32,7 +32,7 @@
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class PersistedCompositeValue extends AbstractElement implements PersistedValue
+public class PersistedCompositeValue extends AbstractPersisitedValue implements PersistedValue
 {
 
    /** The values */

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedGenericValue.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedGenericValue.java	2009-02-27 15:17:21 UTC (rev 84872)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedGenericValue.java	2009-02-27 15:23:51 UTC (rev 84873)
@@ -31,7 +31,7 @@
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class PersistedGenericValue extends AbstractElement implements PersistedValue
+public class PersistedGenericValue extends AbstractPersisitedValue implements PersistedValue
 {
    
    /** A managed-object. */

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedSimpleValue.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedSimpleValue.java	2009-02-27 15:17:21 UTC (rev 84872)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedSimpleValue.java	2009-02-27 15:23:51 UTC (rev 84873)
@@ -39,8 +39,11 @@
    private String className;
    
    /** The value. */
-   String value;
+   private String value;
    
+   /** The modification info. */
+   ModificationInfo info;
+   
    public PersistedSimpleValue()
    {
       //
@@ -79,6 +82,17 @@
       this.className = className;
    }
    
+   @XmlAttribute(name = "modification")
+   public ModificationInfo getModificationInfo()
+   {
+      return this.info;
+   }
+   
+   public void setModificationInfo(ModificationInfo info)
+   {
+      this.info = info;
+   }
+   
    @XmlValue 
    public String getValue()
    {

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedTableValue.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedTableValue.java	2009-02-27 15:17:21 UTC (rev 84872)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedTableValue.java	2009-02-27 15:23:51 UTC (rev 84873)
@@ -31,7 +31,7 @@
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
  */
-public class PersistedTableValue extends AbstractElement implements PersistedValue
+public class PersistedTableValue extends AbstractPersisitedValue implements PersistedValue
 {
 
    /** The entries. */

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedValue.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedValue.java	2009-02-27 15:17:21 UTC (rev 84872)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/xml/PersistedValue.java	2009-02-27 15:23:51 UTC (rev 84873)
@@ -22,7 +22,7 @@
 package org.jboss.system.server.profileservice.persistence.xml;
 
 /**
- * A Value.
+ * A persisted value.
  * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
@@ -30,5 +30,20 @@
 public interface PersistedValue extends PersistedElement
 {
    
+   /**
+    * Get the modification info for this value.
+    * 
+    * @return the modification info
+    */
+   ModificationInfo getModificationInfo();
+   
+   
+   /**
+    * Set the modification info.
+    * 
+    * @param info the modification info
+    */
+   void setModificationInfo(ModificationInfo info);
+   
 }
 




More information about the jboss-cvs-commits mailing list