[jboss-cvs] JBossAS SVN: r63292 - in projects/microcontainer/trunk/managed/src/main/org/jboss/managed: plugins and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 1 01:08:32 EDT 2007


Author: scott.stark at jboss.org
Date: 2007-06-01 01:08:31 -0400 (Fri, 01 Jun 2007)
New Revision: 63292

Added:
   projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedOperation.java
   projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedParameter.java
Modified:
   projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedObject.java
   projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/ManagedObjectImpl.java
Log:
JBMICROCONT-178, start the managed operation spi changes

Modified: projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedObject.java
===================================================================
--- projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedObject.java	2007-06-01 01:44:07 UTC (rev 63291)
+++ projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedObject.java	2007-06-01 05:08:31 UTC (rev 63292)
@@ -67,4 +67,12 @@
     * @return the properties
     */
    Set<ManagedProperty> getProperties();
+
+
+   /**
+    * Get the operations.
+    * @return A possibly empty set of the operations assocated with
+    * the managed object.
+    */
+   Set<ManagedOperation> getOperations();
 }

Added: projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedOperation.java
===================================================================
--- projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedOperation.java	                        (rev 0)
+++ projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedOperation.java	2007-06-01 05:08:31 UTC (rev 63292)
@@ -0,0 +1,88 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.managed.api;
+
+import java.io.Serializable;
+
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.values.MetaValue;
+
+/**
+ * A representation of a managed operation.
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public interface ManagedOperation extends Serializable
+{
+   /**
+    * The side-effect impact of invoking an operation
+    */
+   public enum Impact {
+      /** There is not modification of the ManagedObject */
+      ReadOnly,
+      /** The impact may modify the ManagedObject */
+      ReadWrite,
+      /** The impact is to modify the ManagedObject */
+      WriteOnly,
+      /** The impact is not known */
+      Unknown
+   };
+
+   /**
+    * Get the operation description
+    * @return the operation description
+    */
+   public String getDescription();
+   /**
+    * Get the name of the operation
+    * @return the name of the operation
+    */
+   public String getName();
+
+   /**
+    * Get the impact of the operation
+    * @return the side-effect type invoking the operation has.
+    */
+   public Impact getImpact();
+
+   /**
+    * The MetaType for the operation return value.
+    * @return MetaType for the operation return value.
+    */
+   public MetaType getReturnType();
+
+   /**
+    * The parameter information for the operation arguments. An empty
+    * signature array is returned if the operation takes no arguments.
+    * @return parameter information for the operation arguments.
+    */
+   public ManagedParameter[] getSignature();
+
+   /**
+    * Invoker the operation given its parameter values.
+    * 
+    * @param param the varags for the operation parameters.
+    * @return the MetaValue for the result.
+    */
+   public Object invoke(MetaValue... param);
+}


Property changes on: projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedOperation.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Added: projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedParameter.java
===================================================================
--- projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedParameter.java	                        (rev 0)
+++ projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedParameter.java	2007-06-01 05:08:31 UTC (rev 63292)
@@ -0,0 +1,102 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.managed.api;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.values.MetaValue;
+
+/**
+ * A representation of a ManagedOperation parameter
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public interface ManagedParameter extends Serializable
+{
+   /**
+    * Get the property's name
+    * 
+    * @return the property's name
+    */
+   String getName();
+
+   /**
+    * Get the description
+    * 
+    * @return the description
+    */
+   String getDescription();
+
+   /**
+    * Get the type
+    * 
+    * @return the type
+    */
+   MetaType getMetaType();
+
+   /**
+    * Get the value
+    * 
+    * @return the value
+    */
+   Object getValue();
+
+   /**
+    * Set the value
+    * 
+    * @param value the value
+    */
+   void setValue(Serializable value);
+
+   /**
+    * Get the legal values
+    * 
+    * @return the legal values
+    */
+   Set<MetaValue> getLegalValues();
+
+   /**
+    * Get the minimum value
+    * 
+    * @return the minimum value
+    */
+   Comparable getMinimumValue();
+
+   /**
+    * Get the miximum value
+    * 
+    * @return the maximum value
+    */
+   Comparable getMaximumValue();
+
+   /**
+    * Check whether this is a valid value
+    * 
+    * @param value the value
+    * @return null for a valid value, an error message otherwise
+    */
+   String checkValidValue(Serializable value);
+   
+}


Property changes on: projects/microcontainer/trunk/managed/src/main/org/jboss/managed/api/ManagedParameter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Modified: projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/ManagedObjectImpl.java
===================================================================
--- projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/ManagedObjectImpl.java	2007-06-01 01:44:07 UTC (rev 63291)
+++ projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/ManagedObjectImpl.java	2007-06-01 05:08:31 UTC (rev 63292)
@@ -26,6 +26,7 @@
 import java.util.Set;
 
 import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedOperation;
 import org.jboss.managed.api.ManagedProperty;
 
 /**
@@ -143,7 +144,12 @@
    {
       this.attachment = attachment;
    }
-   
+
+   public Set<ManagedOperation> getOperations()
+   {
+      return null;
+   }
+
    @Override
    public boolean equals(Object obj)
    {




More information about the jboss-cvs-commits mailing list