org.openbp.guiclient.util
Class ActivityBuilderUtil

java.lang.Object
  extended by org.openbp.guiclient.util.ActivityBuilderUtil

public class ActivityBuilderUtil
extends java.lang.Object

Utility methods for the construction of action items.

Author:
Heiko Erhardt

Field Summary
static int MAKESOCKET_ARRANGE
          Flag for makeSocket(org.openbp.core.model.item.activity.ActivityItem, java.lang.String, int, org.openbp.core.model.item.activity.ActivityParam[]): Arrange socket
static int MAKESOCKET_DEFAULT
          Flag for makeSocket(org.openbp.core.model.item.activity.ActivityItem, java.lang.String, int, org.openbp.core.model.item.activity.ActivityParam[]): Default socket
static int MAKESOCKET_ENTRY
          Flag for makeSocket(org.openbp.core.model.item.activity.ActivityItem, java.lang.String, int, org.openbp.core.model.item.activity.ActivityParam[]): Entry socket
 
Method Summary
static ActivityParam makeParam(DisplayObject dob, DataTypeItem type, boolean optional)
          Creates an activity parameter.
static ActivityParam makeParam(java.lang.String name, java.lang.String displayName, java.lang.String description, DataTypeItem type, boolean optional)
          Creates an activity parameter.
static boolean makeSocket(ActivityItem item, java.lang.String socketName, int flags, ActivityParam[] newParamList)
          Creates or updates an activity socket.
static boolean removeSocket(ActivityItem item, java.lang.String socketName)
          Removes an activity socket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAKESOCKET_ENTRY

public static final int MAKESOCKET_ENTRY
Flag for makeSocket(org.openbp.core.model.item.activity.ActivityItem, java.lang.String, int, org.openbp.core.model.item.activity.ActivityParam[]): Entry socket

See Also:
Constant Field Values

MAKESOCKET_DEFAULT

public static final int MAKESOCKET_DEFAULT
Flag for makeSocket(org.openbp.core.model.item.activity.ActivityItem, java.lang.String, int, org.openbp.core.model.item.activity.ActivityParam[]): Default socket

See Also:
Constant Field Values

MAKESOCKET_ARRANGE

public static final int MAKESOCKET_ARRANGE
Flag for makeSocket(org.openbp.core.model.item.activity.ActivityItem, java.lang.String, int, org.openbp.core.model.item.activity.ActivityParam[]): Arrange socket

See Also:
Constant Field Values
Method Detail

makeSocket

public static boolean makeSocket(ActivityItem item,
                                 java.lang.String socketName,
                                 int flags,
                                 ActivityParam[] newParamList)
Creates or updates an activity socket.

Parameters:
item - Visual item
socketName - Socket name
flags - MAKESOCKET_ENTRY | MAKESOCKET_DEFAULT | MAKESOCKET_ARRANGE
newParamList - List of parameters to add to the socket
Returns:
true The socket was created or updated false No change to the socket was made

removeSocket

public static boolean removeSocket(ActivityItem item,
                                   java.lang.String socketName)
Removes an activity socket.

Parameters:
item - Visual item
socketName - Socket name
Returns:
true The socket was removed false No change to the socket was made

makeParam

public static ActivityParam makeParam(java.lang.String name,
                                      java.lang.String displayName,
                                      java.lang.String description,
                                      DataTypeItem type,
                                      boolean optional)
Creates an activity parameter.

Parameters:
name - Parameter name
displayName - Parameter display name
description - Parameter description
type - Data type of the parameter
optional - true The parameter is optional.
false The parmeter is required.
Returns:
The new parameter

makeParam

public static ActivityParam makeParam(DisplayObject dob,
                                      DataTypeItem type,
                                      boolean optional)
Creates an activity parameter. The method will use the name and description name of the supplied data type to initialize the parameter.

Parameters:
dob - Description object to use for the parameter name and description
type - Data type of the parameter
optional - true The parameter is optional.
false The parmeter is required.
Returns:
The new parameter


Copyright © 2011. All Rights Reserved.