|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<java.lang.String,java.lang.Object>
org.ofbiz.service.ModelService
public class ModelService
Generic Service Model Class
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
boolean |
auth
Does this service require authorization |
protected java.util.Map<java.lang.String,ModelParam> |
contextInfo
Context Information, a Map of parameters used by the service, contains ModelParam objects |
protected java.util.List<ModelParam> |
contextParamList
Context Information, a List of parameters used by the service, contains ModelParam objects |
boolean |
debug
Enable verbose debugging when calling this service |
java.lang.String |
defaultEntityName
The default Entity to use for auto-attributes |
java.lang.String |
definitionLocation
The location of the definition this service |
java.lang.String |
description
The description of this service |
java.lang.String |
engineName
The name of the service engine |
static java.lang.String |
ERROR_MESSAGE
|
static java.lang.String |
ERROR_MESSAGE_LIST
|
static java.lang.String |
ERROR_MESSAGE_MAP
|
boolean |
export
Can this service be exported via RPC, RMI, SOAP, etc |
java.lang.String |
fromLoader
The loader which loaded this definition |
java.util.Set<ModelServiceIface> |
implServices
Set of services this service implements |
static java.lang.String |
IN_PARAM
|
protected boolean |
inheritedParameters
Flag to say if we have pulled in our addition parameters from our implemented service(s) |
GroupModel |
internalGroup
Internal Service Group |
java.lang.String |
invoke
The method or function to invoke for this service |
java.lang.String |
location
The package name or location of this service |
int |
maxRetry
Sets the max number of times this service will retry when failed (persisted async only) |
static java.lang.String |
module
|
java.lang.String |
name
The name of this service |
java.lang.String |
nameSpace
The namespace of this service |
java.util.List<ModelNotification> |
notifications
List of email-notifications for this service |
static java.lang.String |
OUT_PARAM
|
java.util.Set<ModelParam> |
overrideParameters
Set of override parameters |
java.util.List<ModelPermGroup> |
permissionGroups
List of permission groups for service invocation |
java.lang.String |
permissionMainAction
Permission service main-action |
java.lang.String |
permissionResourceDesc
Permission service resource-description |
java.lang.String |
permissionServiceName
Permission service name |
boolean |
requireNewTransaction
Require a new transaction for this service |
static java.lang.String |
resource
|
static java.lang.String |
RESPOND_ERROR
|
static java.lang.String |
RESPOND_FAIL
|
static java.lang.String |
RESPOND_SUCCESS
|
static java.lang.String |
RESPONSE_MESSAGE
|
java.lang.String |
semaphore
Semaphore setting (wait, fail, none) |
int |
semaphoreSleep
Semaphore sleep time (in milliseconds) |
int |
semaphoreWait
Semaphore wait time (in milliseconds) |
static java.lang.String |
SUCCESS_MESSAGE
|
static java.lang.String |
SUCCESS_MESSAGE_LIST
|
static java.lang.String |
TNS
|
int |
transactionTimeout
Override the default transaction timeout, only works if we start the transaction |
boolean |
useTransaction
Create a transaction for this service (if one is not already in place...)? |
boolean |
validate
Validate the context info for this service |
static java.lang.String |
XSD
|
Constructor Summary | |
---|---|
ModelService()
|
|
ModelService(ModelService model)
|
Method Summary | |
---|---|
void |
addParam(ModelParam param)
Adds a parameter definition to this service; puts on list in order added then sorts by order if specified. |
void |
addParamClone(ModelParam param)
Adds a clone of a parameter definition to this service |
boolean |
containsPermissions()
|
java.lang.String |
debugInfo()
|
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
entrySet()
|
void |
evalNotifications(DispatchContext dctx,
java.util.Map<java.lang.String,? extends java.lang.Object> context,
java.util.Map<java.lang.String,java.lang.Object> result)
Evaluates notifications |
java.util.Map<java.lang.String,java.lang.Object> |
evalPermission(DispatchContext dctx,
java.util.Map<java.lang.String,? extends java.lang.Object> context)
Evaluates permission-service for this service. |
boolean |
evalPermissions(DispatchContext dctx,
java.util.Map<java.lang.String,? extends java.lang.Object> context)
Evaluates permissions for a service. |
java.lang.Object |
get(java.lang.Object name)
|
java.util.Set<java.lang.String> |
getAllParamNames()
|
int |
getDefinedInCount()
|
int |
getDefinedOutCount()
|
java.util.List<ModelParam> |
getInModelParamList()
Returns a list of ModelParam objects in the order they were defined when the service was created. |
java.util.List<java.lang.Object> |
getInParameterSequence(java.util.Map<java.lang.String,? extends java.lang.Object> source)
Gets a list of required IN parameters in sequence. |
java.util.Set<java.lang.String> |
getInParamNames()
|
java.util.List<ModelParam> |
getModelParamList()
Returns a list of ModelParam objects in the order they were defined when the service was created. |
java.util.Set<java.lang.String> |
getOutParamNames()
|
ModelParam |
getParam(java.lang.String name)
Gets the ModelParam by name |
java.util.List<java.lang.String> |
getParameterNames(java.lang.String mode,
boolean optional)
|
java.util.List<java.lang.String> |
getParameterNames(java.lang.String mode,
boolean optional,
boolean internal)
Gets the parameter names of the specified mode (IN/OUT/INOUT). |
void |
getWSDL(Definition def,
java.lang.String locationURI)
|
boolean |
inheritedParameters()
Test if we have already inherited our interface parameters |
void |
interfaceUpdate(DispatchContext dctx)
Run the interface update and inherit all interface parameters |
java.util.Map<java.lang.String,java.lang.Object> |
makeValid(java.util.Map<java.lang.String,? extends java.lang.Object> source,
java.lang.String mode)
Creates a new Map based from an existing map with just valid parameters. |
java.util.Map<java.lang.String,java.lang.Object> |
makeValid(java.util.Map<java.lang.String,? extends java.lang.Object> source,
java.lang.String mode,
boolean includeInternal,
java.util.List<java.lang.Object> errorMessages)
Creates a new Map based from an existing map with just valid parameters. |
java.util.Map<java.lang.String,java.lang.Object> |
makeValid(java.util.Map<java.lang.String,? extends java.lang.Object> source,
java.lang.String mode,
boolean includeInternal,
java.util.List<java.lang.Object> errorMessages,
java.util.Locale locale)
Creates a new Map based from an existing map with just valid parameters. |
java.util.Map<java.lang.String,java.lang.Object> |
makeValid(java.util.Map<java.lang.String,? extends java.lang.Object> source,
java.lang.String mode,
boolean includeInternal,
java.util.List<java.lang.Object> errorMessages,
java.util.TimeZone timeZone,
java.util.Locale locale)
Creates a new Map based from an existing map with just valid parameters. |
java.lang.Object |
put(java.lang.String o1,
java.lang.Object o2)
|
java.lang.String |
toString()
|
org.w3c.dom.Document |
toWSDL(java.lang.String locationURI)
|
static boolean |
typeValidate(org.ofbiz.service.ModelParam.ModelParamValidator vali,
java.lang.Object testValue)
|
void |
updateDefaultValues(java.util.Map<java.lang.String,java.lang.Object> context,
java.lang.String mode)
|
void |
validate(java.util.Map<java.lang.String,java.lang.Object> context,
java.lang.String mode,
java.util.Locale locale)
Validates a Map against the IN or OUT parameter information |
static void |
validate(java.util.Map<java.lang.String,java.lang.String> info,
java.util.Map<java.lang.String,? extends java.lang.Object> test,
boolean reverse,
ModelService model,
java.lang.String mode,
java.util.Locale locale)
Validates a map of name, object types to a map of name, objects |
Methods inherited from class java.util.AbstractMap |
---|
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String module
public static final java.lang.String XSD
public static final java.lang.String TNS
public static final java.lang.String OUT_PARAM
public static final java.lang.String IN_PARAM
public static final java.lang.String RESPONSE_MESSAGE
public static final java.lang.String RESPOND_SUCCESS
public static final java.lang.String RESPOND_ERROR
public static final java.lang.String RESPOND_FAIL
public static final java.lang.String ERROR_MESSAGE
public static final java.lang.String ERROR_MESSAGE_LIST
public static final java.lang.String ERROR_MESSAGE_MAP
public static final java.lang.String SUCCESS_MESSAGE
public static final java.lang.String SUCCESS_MESSAGE_LIST
public static final java.lang.String resource
public java.lang.String name
public java.lang.String definitionLocation
public java.lang.String description
public java.lang.String engineName
public java.lang.String nameSpace
public java.lang.String location
public java.lang.String invoke
public java.lang.String defaultEntityName
public java.lang.String fromLoader
public boolean auth
public boolean export
public boolean debug
public boolean validate
public boolean useTransaction
public boolean requireNewTransaction
public int transactionTimeout
public int maxRetry
public java.lang.String permissionServiceName
public java.lang.String permissionMainAction
public java.lang.String permissionResourceDesc
public java.lang.String semaphore
public int semaphoreWait
public int semaphoreSleep
public java.util.Set<ModelServiceIface> implServices
public java.util.Set<ModelParam> overrideParameters
public java.util.List<ModelPermGroup> permissionGroups
public java.util.List<ModelNotification> notifications
public GroupModel internalGroup
protected java.util.Map<java.lang.String,ModelParam> contextInfo
protected java.util.List<ModelParam> contextParamList
protected boolean inheritedParameters
Constructor Detail |
---|
public ModelService()
public ModelService(ModelService model)
Method Detail |
---|
public java.lang.Object get(java.lang.Object name)
get
in interface java.util.Map<java.lang.String,java.lang.Object>
get
in class java.util.AbstractMap<java.lang.String,java.lang.Object>
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
entrySet
in interface java.util.Map<java.lang.String,java.lang.Object>
entrySet
in class java.util.AbstractMap<java.lang.String,java.lang.Object>
public java.lang.Object put(java.lang.String o1, java.lang.Object o2)
put
in interface java.util.Map<java.lang.String,java.lang.Object>
put
in class java.util.AbstractMap<java.lang.String,java.lang.Object>
public java.lang.String toString()
toString
in class java.util.AbstractMap<java.lang.String,java.lang.Object>
public java.lang.String debugInfo()
public boolean inheritedParameters()
public ModelParam getParam(java.lang.String name)
name
- The name of the parameter to get
public void addParam(ModelParam param)
public void addParamClone(ModelParam param)
public java.util.Set<java.lang.String> getAllParamNames()
public java.util.Set<java.lang.String> getInParamNames()
public int getDefinedInCount()
public java.util.Set<java.lang.String> getOutParamNames()
public int getDefinedOutCount()
public void updateDefaultValues(java.util.Map<java.lang.String,java.lang.Object> context, java.lang.String mode)
public void validate(java.util.Map<java.lang.String,java.lang.Object> context, java.lang.String mode, java.util.Locale locale) throws ServiceValidationException
test
- The Map object to testmode
- Test either mode IN or mode OUT
ServiceValidationException
public static void validate(java.util.Map<java.lang.String,java.lang.String> info, java.util.Map<java.lang.String,? extends java.lang.Object> test, boolean reverse, ModelService model, java.lang.String mode, java.util.Locale locale) throws ServiceValidationException
info
- The map of name, object typestest
- The map to test its value types.reverse
- Test the maps in reverse.
ServiceValidationException
public static boolean typeValidate(org.ofbiz.service.ModelParam.ModelParamValidator vali, java.lang.Object testValue) throws GeneralException
GeneralException
public java.util.List<java.lang.String> getParameterNames(java.lang.String mode, boolean optional, boolean internal)
mode
- The mode (IN/OUT/INOUT)optional
- True if to include optional parametersinternal
- True to include internal parameters
public java.util.List<java.lang.String> getParameterNames(java.lang.String mode, boolean optional)
public java.util.Map<java.lang.String,java.lang.Object> makeValid(java.util.Map<java.lang.String,? extends java.lang.Object> source, java.lang.String mode)
source
- The source mapmode
- The mode which to build the new mappublic java.util.Map<java.lang.String,java.lang.Object> makeValid(java.util.Map<java.lang.String,? extends java.lang.Object> source, java.lang.String mode, boolean includeInternal, java.util.List<java.lang.Object> errorMessages)
source
- The source mapmode
- The mode which to build the new mapincludeInternal
- When false will exclude internal fieldspublic java.util.Map<java.lang.String,java.lang.Object> makeValid(java.util.Map<java.lang.String,? extends java.lang.Object> source, java.lang.String mode, boolean includeInternal, java.util.List<java.lang.Object> errorMessages, java.util.Locale locale)
source
- The source mapmode
- The mode which to build the new mapincludeInternal
- When false will exclude internal fieldslocale
- Locale to use to do some type conversionpublic java.util.Map<java.lang.String,java.lang.Object> makeValid(java.util.Map<java.lang.String,? extends java.lang.Object> source, java.lang.String mode, boolean includeInternal, java.util.List<java.lang.Object> errorMessages, java.util.TimeZone timeZone, java.util.Locale locale)
source
- The source mapmode
- The mode which to build the new mapincludeInternal
- When false will exclude internal fieldstz
- TimeZone to use to do some type conversionlocale
- Locale to use to do some type conversionpublic boolean containsPermissions()
public java.util.Map<java.lang.String,java.lang.Object> evalPermission(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
dctx
- DispatchContext from the invoked servicecontext
- Map containing userLogin and context infromation
public void evalNotifications(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context, java.util.Map<java.lang.String,java.lang.Object> result)
public boolean evalPermissions(DispatchContext dctx, java.util.Map<java.lang.String,? extends java.lang.Object> context)
dctx
- DispatchContext from the invoked servicecontext
- Map containing userLogin infromation
public java.util.List<java.lang.Object> getInParameterSequence(java.util.Map<java.lang.String,? extends java.lang.Object> source)
public java.util.List<ModelParam> getModelParamList()
public java.util.List<ModelParam> getInModelParamList()
public void interfaceUpdate(DispatchContext dctx) throws GenericServiceException
dctx
- The DispatchContext to use for service lookups
GenericServiceException
public org.w3c.dom.Document toWSDL(java.lang.String locationURI) throws WSDLException
WSDLException
public void getWSDL(Definition def, java.lang.String locationURI) throws WSDLException
WSDLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |