public class BuildStructureConfiguration extends BasicEnvironmentSupport
| Modifier and Type | Field and Description |
|---|---|
static boolean |
defaultCopyRelAttributes |
static java.lang.String |
UNDEFINED_REL |
env| Constructor and Description |
|---|
BuildStructureConfiguration()
Constructs a new instance
|
| Modifier and Type | Method and Description |
|---|---|
protected ConnectionGroup |
createConnectionGroup()
Creates the ConnectionGroup instance to be used.
|
protected ConnectionInfo |
createConnectionInfo()
Creates the ConnectionInfo instance to be used.
|
ConnectionInfo[] |
createConnectionInfos()
Creates new
ConnectionInfo and adds it to this
configuration. |
FlatTableBean |
createTableBeanForEdit() |
java.lang.String[] |
getAllowedRelations()
Returns the limited relationship list (if any).
|
boolean |
getCanEditRelationshipAttributes()
Returns true if user is allowed to edit the relationship attributes
|
boolean |
getCanSelectRelationships()
Returns true if user is allowed to select relatioinships
|
java.util.Collection<java.lang.String> |
getChoosableRelationships()
Returns a list of relationships, that may be used to connect the
specified objects based upon this configuration.
|
ConnectionGroup |
getConnectionGroup(java.lang.String relType)
Returns a specific
ConnectionGroup instance matching the
given relationship type, or null if none exists for this configuration. |
ConnectionGroup[] |
getConnectionGroups()
Returns all
ConnectionGroup instances held by this
configuration. |
ConnectionInfo |
getConnectionInfoById(java.lang.String id)
Returns a connection id based upon the id or null if none exists.
|
ConnectionInfo[] |
getConnectionInfos()
Returns all
ConnectionInfo instances created. |
boolean |
getCopyRelationshipAttributes() |
Direction |
getDefaultDirection()
Returns the default direction
|
java.lang.String |
getDefaultRelationship()
Returns the name of the default relationship.
|
Layout |
getLayout() |
StructureBean |
getOriginStructure() |
TableBean<?> |
getOriginTable() |
TableRenderer |
getRendererForAttributesEdit() |
java.util.List<java.lang.String> |
getSourceOids()
Returns the object id of the source object
|
java.util.List<java.lang.String> |
getSourceRids() |
java.util.List<java.lang.String> |
getTargetOids()
Returns the object id(s) of the target object(s)
|
boolean |
hasUndefinedConnection()
Returns true if this configuration contains at least one ConnectionInfo
instance with an undefined relationship.
|
protected void |
init()
initializes the instance variables
|
boolean |
isAutoLoad() |
boolean |
isMoveAllowed() |
boolean |
isRelationshipAllowed(java.lang.String relationship)
Check if the given relationship is allowed to use within this
configuration
|
boolean |
isReplaceAllowed() |
protected java.lang.String |
paramString() |
void |
recycle()
Recycles this instance, e.g.
|
void |
remove(ConnectionInfo cInfo)
Removes a ConnectionInfo instance from this configuration
|
StructureModifiableTableBean.ReplaceResult |
replaceObject(StructureModifiableTableBean<?> target,
java.lang.String relationshipId,
java.lang.String objectId,
java.lang.String newObjectId)
Performs a replace of the source object with the target object, on the
specified relationship.
|
void |
setAllowedRelations(java.lang.String[] allowedRelations)
Limits the relationship types used for this configuration
|
void |
setAutoLoad(boolean autoLoad) |
void |
setCanEditRelationshipAttributes(boolean canEditRelationshipAttributes)
Specify if the user may/may not edit the relationship attributes after
the connection(s) has been made.
|
void |
setCanSelectRelationships(boolean canSelectRelationships)
Specify if the user may/may not manually specify the relationship to use
for each connection made.
|
void |
setCopyRelationshipAttributes(boolean copyRelationshipAttributes) |
void |
setDefaultDirection(boolean isFrom) |
void |
setDefaultDirection(Direction defaultDir)
Set the default direction to use when building structures Default is
FROM.
|
void |
setDefaultRelationship(java.lang.String defaultRelationship)
Sets the default relationship to use.
|
void |
setLayout(Layout layout) |
void |
setMoveAllowed(boolean enabled) |
void |
setOriginTable(TableBean<?> table) |
void |
setReplaceAllowed(boolean enabled) |
void |
setSource(java.lang.String[] sourceRids,
java.lang.String[] sourceOids) |
void |
setTarget(java.lang.String[] targetRids,
java.lang.String[] targetOids) |
java.lang.String |
toString()
Returns a string representation of the component.
|
getEnv, getEnv, setEnvpublic static final boolean defaultCopyRelAttributes
public static final java.lang.String UNDEFINED_REL
public BuildStructureConfiguration()
protected ConnectionGroup createConnectionGroup()
protected ConnectionInfo createConnectionInfo()
public ConnectionInfo[] createConnectionInfos()
throws java.lang.IllegalArgumentException
ConnectionInfo and adds it to this
configuration.java.lang.IllegalArgumentException - Upon argument errorpublic FlatTableBean createTableBeanForEdit()
public java.lang.String[] getAllowedRelations()
public boolean getCanEditRelationshipAttributes()
public boolean getCanSelectRelationships()
public java.util.Collection<java.lang.String> getChoosableRelationships()
throws TVCException
TVCException - If unable to retreive data from the databasepublic ConnectionGroup getConnectionGroup(java.lang.String relType)
ConnectionGroup instance matching the
given relationship type, or null if none exists for this configuration.public ConnectionGroup[] getConnectionGroups()
ConnectionGroup instances held by this
configuration.public ConnectionInfo getConnectionInfoById(java.lang.String id)
public ConnectionInfo[] getConnectionInfos()
ConnectionInfo instances created.public boolean getCopyRelationshipAttributes()
public Direction getDefaultDirection()
public java.lang.String getDefaultRelationship()
public Layout getLayout()
public StructureBean getOriginStructure()
public TableBean<?> getOriginTable()
public TableRenderer getRendererForAttributesEdit()
public java.util.List<java.lang.String> getSourceOids()
public java.util.List<java.lang.String> getSourceRids()
public java.util.List<java.lang.String> getTargetOids()
public boolean hasUndefinedConnection()
protected void init()
public boolean isAutoLoad()
public boolean isMoveAllowed()
public boolean isRelationshipAllowed(java.lang.String relationship)
public boolean isReplaceAllowed()
protected java.lang.String paramString()
public void recycle()
public void remove(ConnectionInfo cInfo)
public StructureModifiableTableBean.ReplaceResult replaceObject(StructureModifiableTableBean<?> target, java.lang.String relationshipId, java.lang.String objectId, java.lang.String newObjectId) throws TVCException
target - relationshipId - objectId - newObjectId - StructureModifiableTableBean.ReplaceResultTVCExceptionpublic void setAllowedRelations(java.lang.String[] allowedRelations)
public void setAutoLoad(boolean autoLoad)
autoLoad - Whether the source table will be loaded automatically,
i.e., no search.public void setCanEditRelationshipAttributes(boolean canEditRelationshipAttributes)
public void setCanSelectRelationships(boolean canSelectRelationships)
public void setCopyRelationshipAttributes(boolean copyRelationshipAttributes)
public void setDefaultDirection(boolean isFrom)
public void setDefaultDirection(Direction defaultDir)
public void setDefaultRelationship(java.lang.String defaultRelationship)
public void setLayout(Layout layout)
public void setMoveAllowed(boolean enabled)
public void setOriginTable(TableBean<?> table)
public void setReplaceAllowed(boolean enabled)
public void setSource(java.lang.String[] sourceRids,
java.lang.String[] sourceOids)
public void setTarget(java.lang.String[] targetRids,
java.lang.String[] targetOids)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright ? Technia AB. All Rights Reserved.