public abstract class Proxy extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,org.synchronoss.cpo.CpoAdapter> |
adapterCache |
protected File |
cpoMetaXml |
protected File |
lastDir |
protected org.slf4j.Logger |
logger |
protected org.synchronoss.cpo.meta.CpoMetaDescriptor |
metaDescriptor |
protected DefaultTreeModel |
treeModel |
| Modifier | Constructor and Description |
|---|---|
protected |
Proxy() |
| Modifier and Type | Method and Description |
|---|---|
CpoArgumentNode |
addArgument(CpoFunctionNode cpoFunctionNode,
org.synchronoss.cpo.meta.domain.CpoAttribute cpoAttribute)
Adds a new argument to the supplied function for the supplied cpoAttribute
|
boolean |
addAttribute(CpoClassNode cpoClassNode,
org.synchronoss.cpo.meta.domain.CpoAttribute attribute)
Adds the attribute to the cpoClassNode specified if it doesn't already exist.
|
boolean |
addAttributes(CpoClassNode cpoClassNode,
List<org.synchronoss.cpo.meta.domain.CpoAttribute> attributes)
Adds the attributes to the cpoClassNode specified if they doesn't already exist.
|
CpoClassNode |
addClass(String className)
Adds a new CpoClass to the meta descriptor
|
CpoFunctionNode |
addFunction(CpoFunctionGroupNode cpoFunctionGroupNode)
Adds a new function to the supplied function group node
|
CpoFunctionGroupNode |
addFunctionGroup(CpoClassNode cpoClassNode,
String name,
String type)
Adds a new function group using the supplied name and type to the cpoClassNode
|
protected CpoArgumentNode |
createArgumentNode(org.synchronoss.cpo.meta.domain.CpoArgument cpoArgument)
Creates a new cpo argument node for the supplied cpo argument
|
protected CpoAttributeNode |
createAttributeNode(org.synchronoss.cpo.meta.domain.CpoAttribute cpoAttribute)
Creates a new cpo attribute node for the supplied cpo attribute
|
List<org.synchronoss.cpo.meta.domain.CpoAttribute> |
createAttributesFromClass(String className)
The class is loaded via the classpath and then inspected to create attributes based on all "get" methods.
|
List<org.synchronoss.cpo.meta.domain.CpoAttribute> |
createAttributesFromExpression(String connectionName,
String expression)
The specified connection and expression are used to create attributes
|
protected CpoClassNode |
createClassNode(org.synchronoss.cpo.meta.domain.CpoClass cpoClass)
Creates a new cpo class node for the supplied cpo class
|
protected org.synchronoss.cpo.meta.domain.CpoArgument |
createCpoArgument()
Creates a new cpo argument
|
protected org.synchronoss.cpo.meta.domain.CpoAttribute |
createCpoAttribute()
Creates a new cpo attribute instance
|
protected org.synchronoss.cpo.meta.domain.CpoClass |
createCpoClass(String className)
Creates a new cpo class instance with the given class name
|
protected org.synchronoss.cpo.meta.domain.CpoFunction |
createCpoFunction()
Creates a new cpo function
|
protected org.synchronoss.cpo.meta.domain.CpoFunctionGroup |
createCpoFunctionGroup(String name,
String type)
Creates a new cpo function group with the supplied name and type
|
protected CpoFunctionGroupNode |
createFunctionGroupNode(org.synchronoss.cpo.meta.domain.CpoFunctionGroup cpoFunctionGroup)
Creates a new cpo function group node for the supplied cpo function group
|
protected CpoFunctionNode |
createFunctionNode(org.synchronoss.cpo.meta.domain.CpoFunction cpoFunction)
Creates a new cpo function node for the supplied cpo function
|
TreeModel |
createTreeModel()
Creates a new tree model that represents this proxy
|
Collection<?> |
executeFunctionGroup(String connectionName,
Object obj,
Object objReturnType,
org.synchronoss.cpo.meta.domain.CpoFunctionGroup cpoFGnode,
boolean persist)
Executes the function group.
|
String |
generateSourceCode(CpoClassNode node)
Generates the java source code for the specified class.
|
Vector<String> |
getAllowableDataTypes() |
Vector<String> |
getConnectionList()
Returns a list of connections that will work with this proxy
|
protected org.synchronoss.cpo.CpoAdapter |
getCpoAdapter(String connectionName)
Returns a CpoAdapter for the specified connection name
|
protected File |
getCpoMetaXml()
Returns the file that was loaded to create this proxy
|
String |
getDataTypeName(org.synchronoss.cpo.meta.domain.CpoAttribute cpoAttribute)
Attempt to figure out the java type name for the supplied attribute.
|
String |
getDefaultPackageName()
Returns the default package name
|
org.synchronoss.cpo.parser.ExpressionParser |
getExpressionParser(String expression)
Returns the expression parser to use
|
Set<org.synchronoss.cpo.meta.domain.CpoFunctionGroup> |
getFunctionGroupsUsingAttribute(CpoAttributeNode cpoAttributeNode)
Returns a set of all function groups that have functions having arguments using the supplied attribute
|
File |
getLastDir()
Returns the last directory used
|
String |
getMetaXmlFullName() |
protected CpoRootNode |
getRoot() |
boolean |
isDisplayShortClassName() |
void |
moveFunctionDown(CpoFunctionNode cpoFunctionNode)
Reorders a function down one position within the function group
|
void |
moveFunctionUp(CpoFunctionNode cpoFunctionNode)
Reorders a function up one position within the function group
|
protected void |
nodeChanged(AbstractCpoNode notifier,
AbstractCpoNode changedNode)
Invoked when nodes are changed.
|
void |
removeArgument(CpoArgumentNode cpoArgumentNode)
Removes the cpo argument node from the meta descriptor
|
void |
removeAttribute(CpoAttributeNode cpoAttributeNode)
Removes the cpo attribute node from the meta descriptor
|
void |
removeClass(CpoClassNode cpoClassNode)
Removes the cpo class node from the meta descriptor
|
void |
removeFunction(CpoFunctionNode cpoFunctionNode)
Removes the cpo function node from the meta descriptor
|
void |
removeFunctionGroup(CpoFunctionGroupNode cpoFunctionGroupNode)
Removes the cpo function group node from the meta descriptor
|
void |
save(File file)
Saves all the meta data to the specified file.
|
protected void |
setCpoMetaXml(File cpoMetaXml)
Sets the meta xml file
|
void |
setDefaultPackageName(String packageName)
Sets the default package name
|
void |
setLastDir(File file)
Sets the last directory used
|
protected void |
setMetaDescriptor(org.synchronoss.cpo.meta.CpoMetaDescriptor metaDescriptor)
Sets the CpoMetaDescriptor
|
void |
toggleClassNames() |
String |
toString() |
protected org.slf4j.Logger logger
protected File cpoMetaXml
protected File lastDir
protected org.synchronoss.cpo.meta.CpoMetaDescriptor metaDescriptor
protected DefaultTreeModel treeModel
protected final File getCpoMetaXml()
protected final void setCpoMetaXml(File cpoMetaXml)
protected final void setMetaDescriptor(org.synchronoss.cpo.meta.CpoMetaDescriptor metaDescriptor)
public final TreeModel createTreeModel() throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionprotected CpoRootNode getRoot()
public String getDefaultPackageName()
public void setDefaultPackageName(String packageName)
public File getLastDir()
public void setLastDir(File file)
public String getMetaXmlFullName()
public Vector<String> getConnectionList() throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionpublic Vector<String> getAllowableDataTypes()
public void save(File file) throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionpublic void toggleClassNames()
public boolean isDisplayShortClassName()
protected org.synchronoss.cpo.meta.domain.CpoClass createCpoClass(String className) throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionprotected org.synchronoss.cpo.meta.domain.CpoAttribute createCpoAttribute()
throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionprotected org.synchronoss.cpo.meta.domain.CpoFunctionGroup createCpoFunctionGroup(String name, String type) throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionprotected org.synchronoss.cpo.meta.domain.CpoFunction createCpoFunction()
throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionprotected org.synchronoss.cpo.meta.domain.CpoArgument createCpoArgument()
throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionprotected CpoClassNode createClassNode(org.synchronoss.cpo.meta.domain.CpoClass cpoClass)
protected CpoAttributeNode createAttributeNode(org.synchronoss.cpo.meta.domain.CpoAttribute cpoAttribute)
protected CpoFunctionGroupNode createFunctionGroupNode(org.synchronoss.cpo.meta.domain.CpoFunctionGroup cpoFunctionGroup)
protected CpoFunctionNode createFunctionNode(org.synchronoss.cpo.meta.domain.CpoFunction cpoFunction)
protected CpoArgumentNode createArgumentNode(org.synchronoss.cpo.meta.domain.CpoArgument cpoArgument)
public CpoClassNode addClass(String className) throws org.synchronoss.cpo.CpoException
className - The name of the classorg.synchronoss.cpo.CpoException - if any error occurspublic boolean addAttribute(CpoClassNode cpoClassNode, org.synchronoss.cpo.meta.domain.CpoAttribute attribute)
cpoClassNode - The CpoClassNodeattribute - The CpoAttributepublic CpoFunctionGroupNode addFunctionGroup(CpoClassNode cpoClassNode, String name, String type) throws org.synchronoss.cpo.CpoException
cpoClassNode - The class nodename - The name of the function grouptype - The type of the function grouporg.synchronoss.cpo.CpoException - if any error occurspublic CpoFunctionNode addFunction(CpoFunctionGroupNode cpoFunctionGroupNode) throws org.synchronoss.cpo.CpoException
cpoFunctionGroupNode - The function group nodeorg.synchronoss.cpo.CpoException - if any error occurspublic CpoArgumentNode addArgument(CpoFunctionNode cpoFunctionNode, org.synchronoss.cpo.meta.domain.CpoAttribute cpoAttribute) throws org.synchronoss.cpo.CpoException
cpoFunctionNode - The function to add the argument tocpoAttribute - The cpo attributeorg.synchronoss.cpo.CpoException - if any error occurspublic void removeClass(CpoClassNode cpoClassNode) throws org.synchronoss.cpo.CpoException
cpoClassNode - The class node to removeorg.synchronoss.cpo.CpoException - if any error occurspublic void removeAttribute(CpoAttributeNode cpoAttributeNode) throws org.synchronoss.cpo.CpoException
cpoAttributeNode - The attribute node to removeorg.synchronoss.cpo.CpoException - if any error occurspublic void removeFunctionGroup(CpoFunctionGroupNode cpoFunctionGroupNode) throws org.synchronoss.cpo.CpoException
cpoFunctionGroupNode - The function group node to removeorg.synchronoss.cpo.CpoException - if any error occurspublic void removeFunction(CpoFunctionNode cpoFunctionNode) throws org.synchronoss.cpo.CpoException
cpoFunctionNode - The function node to removeorg.synchronoss.cpo.CpoException - if any error occurspublic void removeArgument(CpoArgumentNode cpoArgumentNode) throws org.synchronoss.cpo.CpoException
cpoArgumentNode - The argument node to removeorg.synchronoss.cpo.CpoException - if any error occurspublic Set<org.synchronoss.cpo.meta.domain.CpoFunctionGroup> getFunctionGroupsUsingAttribute(CpoAttributeNode cpoAttributeNode)
public void moveFunctionUp(CpoFunctionNode cpoFunctionNode)
public void moveFunctionDown(CpoFunctionNode cpoFunctionNode)
public String getDataTypeName(org.synchronoss.cpo.meta.domain.CpoAttribute cpoAttribute) throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionpublic List<org.synchronoss.cpo.meta.domain.CpoAttribute> createAttributesFromExpression(String connectionName, String expression) throws org.synchronoss.cpo.CpoException
connectionName - The name of the connection to useexpression - The expression used to create attributesorg.synchronoss.cpo.CpoException - if there's an error creating the CpoClasspublic List<org.synchronoss.cpo.meta.domain.CpoAttribute> createAttributesFromClass(String className) throws org.synchronoss.cpo.CpoException, ClassNotFoundException
className - The class nameorg.synchronoss.cpo.CpoException - if there's an error creating the CpoClassClassNotFoundException - if the class isn't on the classpathpublic boolean addAttributes(CpoClassNode cpoClassNode, List<org.synchronoss.cpo.meta.domain.CpoAttribute> attributes)
cpoClassNode - The CpoClassNodeattributes - The CpoAttributesprotected void nodeChanged(AbstractCpoNode notifier, AbstractCpoNode changedNode)
public String generateSourceCode(CpoClassNode node)
node - The CpoClassNode to generate source forprotected org.synchronoss.cpo.CpoAdapter getCpoAdapter(String connectionName) throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionpublic Collection<?> executeFunctionGroup(String connectionName, Object obj, Object objReturnType, org.synchronoss.cpo.meta.domain.CpoFunctionGroup cpoFGnode, boolean persist) throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionpublic org.synchronoss.cpo.parser.ExpressionParser getExpressionParser(String expression) throws org.synchronoss.cpo.CpoException
org.synchronoss.cpo.CpoExceptionCopyright © 2014. All Rights Reserved.