public class

OperationDefinition

extends Object
java.lang.Object
   ↳ org.mule.modules.peoplesoft.OperationDefinition

Class Overview

Processes the MetaData Key strings to distinguish the Component Interface ID from the selected Operation. Then populates a new OperationDefinition object to neatly handle both pieces of information.

Summary

Constants
String ENTITY_KEY_OPERATION_PARSER Character used as parser in the MetaDataKey to separate the CI Name (ID) from the CI Operation
Fields
private static final Pattern ENTITY_KEY_CI_ID_PATTERN Pattern created to retrieve the CI Name (ID) only from the MetaData Key (removes the ||{CI Operation} part)
private final String component The Component Interface Name (ID)
private static final Logger logger
private final String operation One of the operations defined in OperationType
Public Methods
String asString()
static OperationDefinition create(String component, String operation)
Initializes a new OperationDefinition object.
static OperationDefinition create(String component)
This must be reviewed.
static OperationDefinition create(String component, OperationType type)
Initializes a new OperationDefinition object.
static OperationDefinition from(MetaDataKey key)
Takes a MetaDataKey, extracts the CI Name and Operation, and builds a new object OperationDefinition using both parameters as input.
String getComponent()
String getName()
OperationType getType()
static OperationDefinition parse(String key)
Searches the MetaDataKey string for the key separator ||.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

private static final String ENTITY_KEY_OPERATION_PARSER

Character used as parser in the MetaDataKey to separate the CI Name (ID) from the CI Operation

Constant Value: "||"

Fields

private static final Pattern ENTITY_KEY_CI_ID_PATTERN

Pattern created to retrieve the CI Name (ID) only from the MetaData Key (removes the ||{CI Operation} part)

private final String component

The Component Interface Name (ID)

private static final Logger logger

private final String operation

One of the operations defined in OperationType

Public Methods

public String asString ()

public static OperationDefinition create (String component, String operation)

Initializes a new OperationDefinition object.

Parameters
component The Component Interface name (ID)
operation The name of the Operation
Returns

public static OperationDefinition create (String component)

This must be reviewed. Looks like a hack ...

Parameters
component

public static OperationDefinition create (String component, OperationType type)

Initializes a new OperationDefinition object.

Parameters
component The Component Interface name (ID)
type The OperationType object
Returns
  • a new instance of {@links OperationDefinition} using both parameters as the constructor arguments

public static OperationDefinition from (MetaDataKey key)

Takes a MetaDataKey, extracts the CI Name and Operation, and builds a new object OperationDefinition using both parameters as input.

Parameters
key An instance of MetaDataKey
Returns

public String getComponent ()

public String getName ()

public OperationType getType ()

public static OperationDefinition parse (String key)

Searches the MetaDataKey string for the key separator ||. If it finds it, it extracts the CI name and the operation and stores them in a new OperationDefinition object

Parameters
key The MetaData key string with the format CI_NAME||OPERATION
Returns
Throws
PeopleSoftRuntimeException when:
  • the key string is null or empty
  • the key doesn't match the expected format
  • the CI name or the operation could not be found in the key string
  • public String toString ()