3,Major classes and interfaces used in the framework.

ENTERPRISE JAVA
Bridging the Gap Between Java Clients and EJBs Using XML

William Louth
Listing 3. Major classes and interfaces used in the framework.


public interface SecurityDescriptor extends java.io.Serializable {
 // The getPermission methods return a constants defined in the
 //  Securable interface
 public int getPermission(String rolename);
 public int getPermission(String[] rolenames);
}
public interface PropertyDescriptor extends java.io.Serializable, Securable {
 public String getMethodName();
 public String getName();
 public int getWidth();
 public int getAlignment();
 public SecurityDescriptor getSecurityDescriptor();

 /**
  * The method referred to in the property descriptor will be invoked
  * on the object passed with the result from the invocation
  * returned.
 */
 public Object getValue(Object obj);
 public Class getType();
}
public interface Name extends java.io.Serializable {
 public String get(Object obj);
}

public interface Securable {
 public final static int RESTRICTED = 0;
 public final static int READONLY = 1;
 public final static int READWRITE = 2;
 SecurityDescriptor getSecurityDescriptor();
}
public interface Descriptor extends java.io.Serializable, Securable {
  /**
   * Get the name for the object passed. See
   * <object-descriptor><name>
  */
  public String getName(Object obj);

 /**
 * Get the type string literal for the object passed; see
 * <object-descriptor><type>
 */
 public String getType(Object obj);
 
 /**
 * Get the icon name for the object passed; see
 *<object-descriptor><icon>
 */
 public String getIcon(Object obj);

 /** 
  * List the actions that can be executed against this object; see
  *  <action-descriptor>
 */
  public List getActionDescriptors();
  public Visitor getActionDescriptors(Visitor v);

 /**
  * List the properties that can be displayed in the interface; see
  * <property-descriptor>
  */
  public List getPropertyDescriptors();
  public Visitor getPropertyDescriptors(Visitor v);
  public PropertyDescriptor getPropertyDescriptor(String name);
 /**
 * Get the security descriptor assigned; see <property-descriptor>
 */
 public SecurityDescriptor getSecurityDescriptor();
  /**
  * see <folder-descriptor>
  */
  public boolean allowsChildren();
  public List getChildren(Object obj);
  public Key getKey();
}
/**
* see <folder-descriptor>
*/
public interface ActionDescriptor extends java.io.Serializable, Securable {
  public SecurityDescriptor getSecurityDescriptor();
  public String getName();
  public String getIcon();
  public Class getActionClass();
  public Map getParameters();
}
/**
* Marker interface for objects that can be displayed in a user
* interface using XML
*/
public interface Describeable extends java.io.Serializable {}
/**
 * All entity beans implementing Detaileable have a getDetails
 * method that returns an object that implements the Details
 * interface. The Details interface extends Describeable thus can be
 * displayed in the user interface using XML.
 */
 public interface Details extends Describeable {
  public EJBObject getRemote();
  public Object key();
  public long version();
}
/**
 * All entity bean remote interfaces extend the Detaileable interface
 */
public interface Detaileable {
  public Details getDetails() throws RemoteException;
}

Featured

Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.