public class WSUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARENT_ATTR
Hierarchy parent attribute name.
|
static java.lang.String |
SHAPE_ATTR
Shape attribute name.
|
Constructor and Description |
---|
WSUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
checkConstraintsConsistencies(java.sql.Connection conn, java.lang.String childWorkspace, java.lang.String parentWorkspace, NFENetworkMetadata nfeNetworkMetadata, NFEEditionMode nfeEditionMode)
Inserts the nodes that were deleted in the parent workspace and child workspace.
|
static void |
disableVersioning(java.sql.Connection conn, java.lang.String table, boolean force, boolean ignoreLastError, boolean isTopology)
Disables versioning with SQL procedure dbms_wm.DisableVersioning.
|
static void |
enableVersioning(java.sql.Connection conn, java.lang.String dataName, java.lang.String historyMode, boolean isTopology, java.lang.String undoSpace)
Enables versioning with SQL procedure dbms_wm.EnableVersioning.
|
static java.util.List<java.lang.Long> |
getModifiedLinks(java.sql.Connection conn, java.lang.String childWorkspace, java.lang.String parentWorkspace, java.lang.String linkTable, NFEEditionMode nfeEditionMode)
Returns the links that are different in child workspace and parent workspace.
|
static NFEConflictsDescriptor |
getWorkspaceConflicts(java.sql.Connection conn, java.lang.String childWorkspace, java.lang.String parentWorkspace, NFEModel nfeModel)
Returns the workspace's conflicts.
|
static void |
gotoWorkspace(java.sql.Connection conn, java.lang.String workspaceName)
Goes to a Workspace given (
workspaceName ) in the DB connection given (conn ). |
static void |
mergeWorkspace(java.sql.Connection conn, java.lang.String workspace)
Applies all workspace changes to its parent workspace,.
|
static void |
refreshWorkspace(java.sql.Connection conn, java.lang.String workspace)
Applies to a workspace all changes made in its parent workspace.
|
static void |
removeDanglingFeatureElements(java.sql.Connection conn, java.lang.String workspace, NFEModel model)
Deletes feature elements that are not referencing existing features.
|
static void |
removeDanglingNetworkElements(java.sql.Connection conn, java.lang.String workspace, NFENetworkMetadata nfeNetworkMetadata, NFEEditionMode nfeEditionMode)
Deletes the network elements that are not referenced by any feature in any feature layer.
|
static void |
removeDanglingRulesElements(java.sql.Connection conn, java.lang.String workspace, NFEModel model)
Deletes rules elements that are not referencing existing features.
|
static void |
resolveConflicts(java.sql.Connection conn, java.util.List<FeatureAttributeDescriptor> featureAttributeDescriptorList, java.lang.String childWorkspace, java.lang.String parentWorkspace, java.lang.String choosenWorkspace, NFEModel nfeModel)
Resolves the specified workspace conflicts.
|
static void |
resolveWSConflicts(java.sql.Connection conn, java.lang.String childWorkspace, java.lang.String table, java.util.Map<java.lang.String,java.lang.String> keyList)
Resolves the conflicts with child workspace changes using SQL procedure dbms_wm.ResolveConflicts.
|
public static final java.lang.String SHAPE_ATTR
public static final java.lang.String PARENT_ATTR
public static void gotoWorkspace(java.sql.Connection conn, java.lang.String workspaceName) throws InvalidDBConnectionException
workspaceName
) in the DB connection given (conn
).conn
- connectionworkspaceName
- workspace nameInvalidDBConnectionException
- if the connection is not valid.public static void refreshWorkspace(java.sql.Connection conn, java.lang.String workspace) throws java.lang.Exception
conn
- connectionworkspace
- workspacejava.lang.Exception
- if an exception is thrownpublic static void mergeWorkspace(java.sql.Connection conn, java.lang.String workspace) throws java.lang.Exception
conn
- connectionworkspace
- child workspacejava.lang.Exception
- if an exception is thrownpublic static NFEConflictsDescriptor getWorkspaceConflicts(java.sql.Connection conn, java.lang.String childWorkspace, java.lang.String parentWorkspace, NFEModel nfeModel) throws java.lang.Exception
conn
- connectionchildWorkspace
- child workspaceparentWorkspace
- parent workspacenfeModel
- modeljava.lang.Exception
- if an exception is thrownpublic static void resolveConflicts(java.sql.Connection conn, java.util.List<FeatureAttributeDescriptor> featureAttributeDescriptorList, java.lang.String childWorkspace, java.lang.String parentWorkspace, java.lang.String choosenWorkspace, NFEModel nfeModel) throws java.lang.Exception
conn
- connectionfeatureAttributeDescriptorList
- attributes in conflictchildWorkspace
- child workspaceparentWorkspace
- parent workspacechoosenWorkspace
- chosen workspacenfeModel
- modeljava.lang.Exception
- if an exception is thrownpublic static void removeDanglingNetworkElements(java.sql.Connection conn, java.lang.String workspace, NFENetworkMetadata nfeNetworkMetadata, NFEEditionMode nfeEditionMode) throws java.lang.Exception
conn
- connectionworkspace
- workspace in which to remove the dangling network elementsnfeNetworkMetadata
- network metadatanfeEditionMode
- model edition modejava.lang.Exception
- if an exception is thrownpublic static void removeDanglingRulesElements(java.sql.Connection conn, java.lang.String workspace, NFEModel model) throws java.lang.Exception
conn
- connectionworkspace
- workspace in which to remove the dangling rules elementsmodel
- modeljava.lang.Exception
- if an exception is thrownpublic static void removeDanglingFeatureElements(java.sql.Connection conn, java.lang.String workspace, NFEModel model) throws java.lang.Exception
conn
- connectionworkspace
- workspace in which to remove the dangling feature elementsmodel
- modeljava.lang.Exception
- if an exception is thrownpublic static void resolveWSConflicts(java.sql.Connection conn, java.lang.String childWorkspace, java.lang.String table, java.util.Map<java.lang.String,java.lang.String> keyList) throws java.lang.Exception
conn
- connectionchildWorkspace
- child workspacetable
- table in which the conflicts will be resolvedkeyList
- The key of the map is the key column name and the value is the value of the key. If empty all the conflicts of the tables are resolved.java.lang.Exception
- if an exception is thrownpublic static void checkConstraintsConsistencies(java.sql.Connection conn, java.lang.String childWorkspace, java.lang.String parentWorkspace, NFENetworkMetadata nfeNetworkMetadata, NFEEditionMode nfeEditionMode) throws java.lang.Exception
conn
- connectionchildWorkspace
- child workspaceparentWorkspace
- parent workspacenfeNetworkMetadata
- network metadatanfeEditionMode
- model edition modejava.lang.Exception
- if an exception is thrownpublic static java.util.List<java.lang.Long> getModifiedLinks(java.sql.Connection conn, java.lang.String childWorkspace, java.lang.String parentWorkspace, java.lang.String linkTable, NFEEditionMode nfeEditionMode) throws java.lang.Exception
conn
- connectionchildWorkspace
- child workspaceparentWorkspace
- parent workspacelinkTable
- link tablenfeEditionMode
- model edition modejava.lang.Exception
- if an exception is thrownpublic static void enableVersioning(java.sql.Connection conn, java.lang.String dataName, java.lang.String historyMode, boolean isTopology, java.lang.String undoSpace) throws java.lang.Exception
conn
- connectiondataName
- table name or topology name if it is a topologyhistoryMode
- to store modifications or not: NONE (default), VIEW_W_OVERWRITE, or VIEW_WO_OVERWRITE. If null, then default NONE is used.isTopology
- if table belongs to topology (TRUE or FALSE).undoSpace
- number representing the maximum number of bytes available for undo space. For example: "1048576" for 1 megabyte. If not defined, then means UNLIMITED undo space.java.lang.Exception
- if an exception is thrownpublic static void disableVersioning(java.sql.Connection conn, java.lang.String table, boolean force, boolean ignoreLastError, boolean isTopology) throws java.lang.Exception
conn
- connectiontable
- table name or topology name if it is topologyforce
- true forces all data in workspaces other than LIVE to be discarded before versioning is disabled. False prevents versioning from being disabled if table_name was modified in any workspace other than LIVE and if the workspace that modified table_name still exists.ignoreLastError
- true ignores the last error, if any, that occurred during the previous call to the DisableVersioning procedure. Information about the last error is stored in the USER_WM_VT_ERRORS and ALL_WM_VT_ERRORS static data dictionary views. False does not ignore the last error, if any, that occurred during the previous call to the DisableVersioning procedure.isTopology
- if table belongs to topology (TRUE or FALSE)java.lang.Exception
- if an exception is thrown