public class BusinessEditorManagerImpl extends BaseManagerImpl implements BusinessEditorManagerInterface, BaseObject.Manager
Modifier and Type | Class and Description |
---|---|
static class |
BaseObject.ChildAlreadyExists |
protected static interface |
BaseObject.Manager |
protected static class |
BaseObject.Matcher |
protected static class |
BaseObject.STATE |
protected static class |
BaseObject.UnsupportedRestOperationException |
ADDL_LIST_DISPLAY_FIELDS, ADDL_LIST_SEARCH_FIELDS, API_NAME, BODY, CHILD_LOOKUP_CODES, DATA_FILTERS, DATETIME_DISPLAY_TYPE, DECIMAL_PLACES, DEFAULT_VALUE, DEFINITION, DEPENDENCY_FIELDS, DESCRIPTION, DISPLAY_HEIGHT, DISPLAY_LABEL, DISPLAY_LABEL_PLURAL, DISPLAY_SEQUENCE, DISPLAY_WIDTH, ENABLED, END_DATE_ACTIVE, ERROR_MESSAGE, EXAMPLE, EXPRESSION, FIELDS, FORMULA_TYPE, FULL_NAME, FUNCTION_ID, FUNCTIONS, GLOBAL_FUNCTIONS, HELP_TEXT, ID, INDEXED, IS_CUSTOM, IS_MULTISELECT_PICKLIST, LIST_DISPLAY_FIELD, LIST_OBJECT, LOOKUP_CODE, LOOKUP_TYPE, LOOKUP_TYPES, LOOKUPS, MATCH_CASE, MAX_LENGTH, MAX_VALUE, MEANING, MIN_LENGTH, MIN_VALUE, NAME, OBJECTS, OPERATOR, PARAMETERS, PARENT_BUSINESS_OBJECT, PARENT_LOOKUP_CODE, PARENT_PICKLIST, PICKLIST_LOOKUP_TYPE, PRIVILEGE, PUBLISHED_AS_REST, RECORD_NAME_LABEL, REQUIRED, REQUIRED_EXPRESSION, RETURN_TYPE, SEARCH_FIELD_API_NAME, SORT_BY, SORT_BY_ASCENDING, START_DATE_ACTIVE, TRIGGERS, TYPE, UPDATABLE, UPDATABLE_EXPRESSION, VALIDATORS, VALUE_MAP, VALUE1, VALUE2, VISIBILITY_PROPERTY
Constructor and Description |
---|
BusinessEditorManagerImpl() |
Modifier and Type | Method and Description |
---|---|
protected org.codehaus.jettison.json.JSONObject |
convertToJSON(java.lang.Object... attrNameAndValues) |
BusinessObject |
createBusinessObject(BusinessObject parent,
java.lang.String name)
Creates a BusinessObject.
|
BusinessObject |
createBusinessObject(BusinessObject parent,
java.lang.String name,
CustomObjectInfo descriptor)
Creates a BusinessObject.Throws JboException if a BusinessObject for the name already exists.
|
BusinessObject |
createBusinessObject(java.lang.String name)
Creates a BusinessObject.
|
BusinessObject |
createBusinessObject(java.lang.String name,
CustomObjectInfo descriptor)
Creates a BusinessObject.
|
protected <T> T |
createChild(java.lang.String accessorName,
java.lang.Class<T> type,
org.codehaus.jettison.json.JSONObject obj) |
GlobalFunction |
createGlobalFunction(java.lang.String name,
java.lang.String returnType,
java.lang.String body)
Creates a global function.
|
void |
deleteBusinessObject(BusinessObject bo)
Deletes a business object.
|
protected void |
deleteChild(BaseObject.Matcher matcher) |
protected void |
deleteChild(java.lang.String accessorName,
java.lang.String childName) |
void |
deleteGlobalFunction(GlobalFunction function)
Deletes a global function.
|
void |
doCreateNewChildren() |
void |
doDeleteChildren() |
void |
doSetAttributes() |
boolean |
equals(java.lang.Object obj) |
BusinessObject |
findBusinessObject(java.lang.String name)
Finds the existing BusinessObject for the given name.
|
protected <T> T |
findChild(java.lang.Class<T> type,
BaseObject.Matcher matcher) |
protected <T> T |
findChild(java.lang.String accessorName,
java.lang.String childName,
java.lang.Class<T> type) |
protected <T> java.util.List<T> |
findChildren(java.lang.Class<T> type,
BaseObject.Matcher matcher)
Find all children objects matching the given Matcher.
|
GlobalFunction |
findGlobalFunction(java.lang.String name,
java.lang.String... paramTypes)
Retrieves the global function with the given name.
|
java.util.Collection<GlobalFunction> |
findGlobalFunctions(java.lang.String name)
Retrieves all global functions with the name.
|
protected java.lang.Object |
getAttribute(java.lang.String attrName) |
protected java.lang.Object |
getAttribute(java.lang.String attrName,
java.lang.Object defaultValue)
Get the attribute value for the given attribute name.
|
java.util.Collection<BusinessObject> |
getBusinessObjects()
Returns all customizable buiness objects, and the reference-only business objects that
contain attributes that can be used for the display and search attribute for dynamic
choice list.
|
protected <T> java.util.Collection<T> |
getChildren(java.lang.String accessorName,
java.lang.Class<T> type) |
protected java.util.List<oracle.adfinternal.businesseditor.restapi.BaseObject> |
getChildrenDeleted(BaseObject.Matcher childMatcher) |
protected org.codehaus.jettison.json.JSONArray |
getChildrenJSON(java.lang.String accessorName)
Get all children of a given type defined by accessorName.
|
protected java.util.List<oracle.adfinternal.businesseditor.restapi.BaseObject> |
getChildrenNew(BaseObject.Matcher childMatcher) |
java.lang.String |
getDescription() |
protected java.lang.String |
getFinderKey(java.lang.String accessorName)
Get the key whose value defines the resource name for this object in URL path
|
java.util.Collection<GlobalFunction> |
getGlobalFunctions()
Returns global functions.
|
protected java.lang.String |
getInternalName()
Name that will represent the resource id for this object.
|
static java.lang.String |
getLocalizedString(java.lang.String key,
java.lang.Object... args) |
BaseObject.Matcher |
getMatcher()
Get a Matcher that is used to compare with another object.
|
java.lang.String |
getName() |
protected oracle.adfinternal.businesseditor.restapi.BaseObject |
getOwner()
Get the container object that contains this object.
|
protected java.lang.String[] |
getQueryKeys(java.lang.String accessorName)
Different types of objects use different names to find a child object.
|
protected BaseObject.STATE |
getState() |
protected <T> T |
initChildObject(java.lang.String accessorName,
org.codehaus.jettison.json.JSONObject child,
java.lang.Class<T> type)
Various methods that return child object needs to create the child object.
|
boolean |
isNew() |
protected void |
setAttribute(java.lang.String attrName,
java.lang.Object value) |
void |
setDescription(java.lang.String text) |
protected void |
setLogger(oracle.adfinternal.model.logging.contextual.logger.functional.FunctionalLogger logger) |
void |
setName(java.lang.String name)
Renames this object.
|
protected java.lang.String |
toApiName(java.lang.String name) |
void |
undoChanges() |
protected void |
verifyObjectIsValid()
Verifies if object is valid.
|
addDirtyObject, commit, getAccessorNameFromOwner, getLogger, release, rollback
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
commit, release, rollback
addDirtyObject
public java.util.Collection<BusinessObject> getBusinessObjects()
BusinessEditorManagerInterface
BusinessObject.isCustomizable()
to identify if a business object is customizable.getBusinessObjects
in interface BusinessEditorManagerInterface
public BusinessObject findBusinessObject(java.lang.String name)
BusinessEditorManagerInterface
findBusinessObject
in interface BusinessEditorManagerInterface
name
- name of object to look forpublic BusinessObject createBusinessObject(java.lang.String name)
BusinessEditorManagerInterface
createBusinessObject
in interface BusinessEditorManagerInterface
name
- name of the BusinessObjectpublic BusinessObject createBusinessObject(java.lang.String name, CustomObjectInfo descriptor)
BusinessEditorManagerInterface
createBusinessObject
in interface BusinessEditorManagerInterface
name
- name of the BusinessObjectdescriptor
- an instance of CustomObjectDescriptorpublic BusinessObject createBusinessObject(BusinessObject parent, java.lang.String name)
BusinessEditorManagerInterface
createBusinessObject
in interface BusinessEditorManagerInterface
parent
- parent of the BusinessObjectname
- name of the BusinessObjectpublic BusinessObject createBusinessObject(BusinessObject parent, java.lang.String name, CustomObjectInfo descriptor)
BusinessEditorManagerInterface
createBusinessObject
in interface BusinessEditorManagerInterface
parent
- parent of the BusinessObjectname
- name of the BusinessObjectdescriptor
- an instance of CustomObjectDescriptorpublic void deleteBusinessObject(BusinessObject bo)
BusinessEditorManagerInterface
deleteBusinessObject
in interface BusinessEditorManagerInterface
bo
- the business object to be deleted.public java.util.Collection<GlobalFunction> getGlobalFunctions()
BusinessEditorManagerInterface
getGlobalFunctions
in interface BusinessEditorManagerInterface
public GlobalFunction findGlobalFunction(java.lang.String name, java.lang.String... paramTypes)
BusinessEditorManagerInterface
findGlobalFunction
in interface BusinessEditorManagerInterface
name
- name of the global function to be returnedparamTypes
- parameters types for the functionpublic java.util.Collection<GlobalFunction> findGlobalFunctions(java.lang.String name)
BusinessEditorManagerInterface
findGlobalFunctions
in interface BusinessEditorManagerInterface
name
- name of the global functions to be returnedpublic GlobalFunction createGlobalFunction(java.lang.String name, java.lang.String returnType, java.lang.String body)
BusinessEditorManagerInterface
createGlobalFunction
in interface BusinessEditorManagerInterface
name
- name of the global functionreturnType
- return typebody
- the function bodypublic void deleteGlobalFunction(GlobalFunction function)
BusinessEditorManagerInterface
deleteGlobalFunction
in interface BusinessEditorManagerInterface
function
- the global function to be deleted.protected <T> T initChildObject(java.lang.String accessorName, org.codehaus.jettison.json.JSONObject child, java.lang.Class<T> type)
T
- Class that is expected type of the returned child object.accessorName
- resource name used to access the childchild
- JSON structure of the child objecttype
- Class instance of the expected type of child objectprotected oracle.adfinternal.businesseditor.restapi.BaseObject getOwner()
protected java.lang.String[] getQueryKeys(java.lang.String accessorName)
accessorName
- the resource name to reach a particular type of child objectprotected java.lang.String getFinderKey(java.lang.String accessorName)
accessorName
- the resource name to reach a particular type of child objectprotected final java.lang.String getInternalName()
protected java.lang.String toApiName(java.lang.String name)
public java.lang.String getName()
public void setName(java.lang.String name)
BaseObject.ChildAlreadyExists
if there
is a name clash. Whether the name can be overloaded or not is left
to the findChild(Class, Matcher)
name
- new namepublic void setDescription(java.lang.String text)
public java.lang.String getDescription()
protected java.lang.Object getAttribute(java.lang.String attrName)
protected void verifyObjectIsValid()
oracle.jbo.JboException
- if object is invalidprotected java.lang.Object getAttribute(java.lang.String attrName, java.lang.Object defaultValue)
attrName
- name of attributedefaultValue
- default valueprotected void setLogger(oracle.adfinternal.model.logging.contextual.logger.functional.FunctionalLogger logger)
protected BaseObject.STATE getState()
public boolean isNew()
protected void setAttribute(java.lang.String attrName, java.lang.Object value)
public BaseObject.Matcher getMatcher()
equals(Object)
which does a finer comparision of the whole URL path. For example,
functions from global functions or different business objects might match in signature
but not equal as their URL path will be different.protected java.util.List<oracle.adfinternal.businesseditor.restapi.BaseObject> getChildrenDeleted(BaseObject.Matcher childMatcher)
protected java.util.List<oracle.adfinternal.businesseditor.restapi.BaseObject> getChildrenNew(BaseObject.Matcher childMatcher)
protected <T> T findChild(java.lang.String accessorName, java.lang.String childName, java.lang.Class<T> type)
protected <T> T findChild(java.lang.Class<T> type, BaseObject.Matcher matcher)
protected <T> java.util.List<T> findChildren(java.lang.Class<T> type, BaseObject.Matcher matcher)
T
- Class that is expected type of the returned children objects.type
- Class instance of type Tmatcher
- Matcher that is used to find the correct childrenprotected org.codehaus.jettison.json.JSONArray getChildrenJSON(java.lang.String accessorName) throws java.lang.Exception
accessorName
- resource name or type of the children objectsjava.lang.Exception
- if any thrown by the GET requestprotected <T> java.util.Collection<T> getChildren(java.lang.String accessorName, java.lang.Class<T> type)
protected <T> T createChild(java.lang.String accessorName, java.lang.Class<T> type, org.codehaus.jettison.json.JSONObject obj)
protected void deleteChild(java.lang.String accessorName, java.lang.String childName)
protected void deleteChild(BaseObject.Matcher matcher)
protected org.codehaus.jettison.json.JSONObject convertToJSON(java.lang.Object... attrNameAndValues)
public void doDeleteChildren()
public void doCreateNewChildren()
public void doSetAttributes()
public void undoChanges()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static java.lang.String getLocalizedString(java.lang.String key, java.lang.Object... args)