Moab Web Services > Plugins > Plugin Developer's Guide > Requirements

Requirements

This section discusses the requirements to create a basic functional plugin. The com.adaptc.mws.plugins package contains the abstract class AbstractPlugin that should form the basis of any new plugin type. However, this class need not be extended to create a functional plugin type. Only two requirements must be fulfilled for this:

  1. The class name must end in Plugin.
  2. There must exist id field getter and setter methods:
  3. * public String getId();
    * public void setId(String id);

The id field may be stored in whichever way desired as long as the getter and setter are available as shown above, but will most likely be implemented as follows:

class BasicPlugin {
	String id
}

In this case, String id will be expanded by the Groovy compiler to the full getter and setter method definitions given above. In other words, no explicit method definitions are actually needed. Note that the BasicPlugin shown above is able to be uploaded as a plugin type to MWS, but does not actually do anything.

It must also be noted that the AbstractPlugin class already implements an id field. Therefore, a plugin type that extends this class does not need to define the field as shown in the following example.

import com.adaptc.mws.plugins.AbstractPlugin

class BasicPlugin extends AbstractPlugin {
	// No ID field is needed since it exists in AbstractPlugin
}

Related Topics 

© 2015 Adaptive Computing