WebObjects 5.2.3

com.webobjects.webservices.generation
Class WOOperation

java.lang.Object
  extended bycom.webobjects.appserver.WOElement
      extended bycom.webobjects.appserver.WOComponent
          extended bycom.webobjects.webservices.generation.WOOperation
All Implemented Interfaces:
Cloneable, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults
Direct Known Subclasses:
WOBeginTransactionOperation, WOCommitTransactionOperation, WODeleteOperation, WOInsertOperation, WORollbackTransactionOperation, WOSearchOperation, WOUpdateOperation, WOWSDLGeneration

public class WOOperation
extends WOComponent

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.webobjects.appserver.WOComponent
WOComponent.Event
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes inherited from class com.webobjects.foundation.NSValidation
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Constructor Summary
WOOperation(WOContext context)
          Constructor for WOOperation.
 
Method Summary
 NSArray aggregateValuesResult(NSArray resultArray)
           
 NSArray attributeClassNames()
          Returns the class name for each input part key path.
 NSArray classesForKeyPaths()
          Returns the representative class for each output key path.
 NSArray comparisonKeys()
          Returns the String keys used for building key value qualifiers for attributes.
 D2WContext d2wContext()
          Returns this operation's D2WContext
 EOEditingContext editingContext()
          Returns this operation's EOEditingContext
 String gidArgumentKey()
          Returns the String key used at the end of a key path to represent that the EO at that key path should be serialized as its EOGenericRecord.
 NSArray inputPartKeyPaths()
          Returns the EOProperty keys/key paths associated with the public names of the operation's input message parts.
 NSArray inputPartNames()
          Returns the names of the operation's SOAP input message parts.
 NSArray inputPartValues()
          Returns the objects this operation was invoked with.
 Object invoke()
          Invokes the operation and returns the invocation's result.
 NSArray outputPartKeyPaths()
          Returns the EOProperty keys/key paths associated with the public names of the operation's output message parts.
 NSArray outputPartNames()
          Returns the names of the operation's SOAP output message parts.
 String propertyNameForPartName(String name)
          Translates the public name of an argument or result key to the EOProperty key path defined in the rule system
static boolean requiresEntity()
          Returns true if this operation must work with an entity.
 void saveChangesInEditingContext()
          Saves changes to the operation's EOEditingContext if the operation should save its changes immediately as specified by WOServiceUtilities.shouldCommitChangesImmediately.
 WOEnterpriseObjectSerializationStrategy serializationStrategy()
          Returns the serialization strategy to use when serializing and deserializing objects for this operation.
 void setD2wContext(D2WContext context)
          Sets this operations D2WContext
 String unspecifiedArgumentKey()
          Returns the String key to represent that the client did not specify a value for an input part.
 
Methods inherited from class com.webobjects.appserver.WOComponent
appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WOOperation

public WOOperation(WOContext context)
Constructor for WOOperation.

Parameters:
context - WOContext this operation was created in
Method Detail

aggregateValuesResult

public NSArray aggregateValuesResult(NSArray resultArray)

attributeClassNames

public NSArray attributeClassNames()
Returns the class name for each input part key path. For key paths that terminate at an EOAttribute, this is the class defined by the EOAttribute. For key paths that terminate at an EORelationship, the class name will be the NSArray class name for toMany relationships, and EOGlobalID for toOne relationships.
The result array is ordered to match the key paths in inputPartKeyPaths.

Returns:
array of class names
See Also:
inputPartKeyPaths()

classesForKeyPaths

public NSArray classesForKeyPaths()
Returns the representative class for each output key path. For key paths that terminate at an EOAttribute, this is the class defined by the EOAttribute. For key paths that terminate at an EORelationship, the class will be the NSArray class for toMany relationships, and EOGlobalID for toOne relationships.
The result array is ordered to match the key paths in outputPartKeyPaths.

Returns:
array of class names
See Also:
outputPartKeyPaths()

comparisonKeys

public NSArray comparisonKeys()
Returns the String keys used for building key value qualifiers for attributes. These keys are defined in the rule system and are ordered to match the inputPartKeyPaths defined in the rule system.

Returns:
array of comparison keys used for building qualifiers
See Also:
inputPartKeyPaths()

d2wContext

public D2WContext d2wContext()
Returns this operation's D2WContext

Returns:
this operation's D2WContext

editingContext

public EOEditingContext editingContext()
Returns this operation's EOEditingContext

Returns:
this operation's EOEditingContext

gidArgumentKey

public String gidArgumentKey()
Returns the String key used at the end of a key path to represent that the EO at that key path should be serialized as its EOGenericRecord. The result is the D2WContext value for key WOServiceUtilities.RuleSystemConstants.GidArgumentKeyKey

Returns:
the String representing an unspecified value

inputPartKeyPaths

public NSArray inputPartKeyPaths()
Returns the EOProperty keys/key paths associated with the public names of the operation's input message parts. These keys are used for key-value coding operations on EO's desrialized during incovation. The result array is ordered so that the index of each argument key path matches that of its associated argument name.

Returns:
array of String key paths representing EOProperty key paths
See Also:
inputPartNames()

inputPartNames

public NSArray inputPartNames()
Returns the names of the operation's SOAP input message parts. These names are translated to the EOProperty key paths of inputPartKeyPaths() during the operation's incovation as EO arguments are deserialized. The result array is ordered so that the index of each input part name matches that of its associated input part key path. This ordering is also used to define the parameterOrdering of the operation's WSDL.

Returns:
array of names for the operation's input message parts
See Also:
inputPartKeyPaths()

inputPartValues

public NSArray inputPartValues()
Returns the objects this operation was invoked with. These are the objects that were deserialized from the SOAP message from the web service's client.
These objects have the same ordering as the arguments sent by the client. A compliant client will send arguments in the same order as was defined in the operation's WSDL, so the ordering will match that of the inputPartNames.

Returns:
array of invocation arguments
See Also:
inputPartNames()

invoke

public Object invoke()
Invokes the operation and returns the invocation's result. Override this method to perform custom work and return a custom result set.

The default implementation returns null.

Returns:
the result of the operation invocation

outputPartKeyPaths

public NSArray outputPartKeyPaths()
Returns the EOProperty keys/key paths associated with the public names of the operation's output message parts. These keys are used for key-value coding operations when serializing EO's during incovation. The result array is ordered so that the index of each output key path matches that of its associated result name.

Returns:
array of String key paths representing EOProperty key paths
See Also:
outputPartNames()

outputPartNames

public NSArray outputPartNames()
Returns the names of the operation's SOAP output message parts. These names are translated to the EOProperty key paths of outputPartKeyPaths() during the operation's incovation as EO result are serialized. The result array is ordered so that the index of each output part name matches that of its associated result key path.

Returns:
array of names for the operation's output message parts
See Also:
outputPartKeyPaths()

propertyNameForPartName

public String propertyNameForPartName(String name)
Translates the public name of an argument or result key to the EOProperty key path defined in the rule system

Parameters:
name - public name of the message part to translate
Returns:
property key path associated with name

requiresEntity

public static boolean requiresEntity()
Returns true if this operation must work with an entity. Subclasses should override this method to return false ONLY if the operation will never return, or accept as input, an EOEnterpriseObject.

Returns:
true if this operation needs an entity name to be defined in its D2WContext, false otherwise
See Also:
WOServiceUtilities.RuleSystemConstants.EntityNameKey

saveChangesInEditingContext

public void saveChangesInEditingContext()
Saves changes to the operation's EOEditingContext if the operation should save its changes immediately as specified by WOServiceUtilities.shouldCommitChangesImmediately.

See Also:
WOServiceUtilities.shouldCommitChangesImmediately(WOContext context)

serializationStrategy

public WOEnterpriseObjectSerializationStrategy serializationStrategy()
Returns the serialization strategy to use when serializing and deserializing objects for this operation. The default implementation returns null;

Returns:
the default implementation returns null

setD2wContext

public void setD2wContext(D2WContext context)
Sets this operations D2WContext

Parameters:
context - the new D2WContext for this operation

unspecifiedArgumentKey

public String unspecifiedArgumentKey()
Returns the String key to represent that the client did not specify a value for an input part. The result is the D2WContext value for key WOServiceUtilities.RuleSystemConstants.UnspecifiedArgumentKeyKey

Returns:
the String representing an unspecified value

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.