Jump to: navigation, search

Difference between revisions of "ProxyManager"


(See also)
 
(5 intermediate revisions by 2 users not shown)
Line 32: Line 32:
  
 
//Queing the proxyInstance for Import
 
//Queing the proxyInstance for Import
pxManager.QueueForImport(new List<Proxy>() { proxyInstance })
+
pxManager.QueueForImport(new List<Proxy>() { proxyInstance });
  
 
//Queing the proxyInstance for Export
 
//Queing the proxyInstance for Export
pxManager.QueueForExport(new List<Proxy>() { proxyInstance })
+
pxManager.QueueForExport(new List<Proxy>() { proxyInstance });
  
 
</source>
 
</source>
Line 54: Line 54:
  
 
//Import Proxy
 
//Import Proxy
UBIK.Interface.ProxyUpdateInformation importResult = pxManager.UpdateProxyToUbik( proxyInstance )
+
UBIK.Interface.ProxyUpdateInformation importResult = pxManager.UpdateProxyToUbik( proxyInstance );
  
 
//Export Proxy
 
//Export Proxy
UBIK.Interface.ProxyExportInformation exportResult =pxManager.UpdateUbikToProxy( proxyInstance )
+
UBIK.Interface.ProxyExportInformation exportResult =pxManager.UpdateUbikToProxy( proxyInstance );
  
 
</source>
 
</source>
 +
 +
 +
'''ProxyUpdateErrorCode'''
 +
 +
The ProxyUpdateErrorCode property on the ProxyUpdateInformation and ProxyExportInformation  provides extended information in case of a not successfull update (export / import). This will help the admin to find inconsistencies in the data. (revision 4 and higher)
 +
 +
{| class="wikitable" | width = "50%"
 +
|-
 +
! Error Value!! ErrorName !! Description
 +
|-
 +
| 0|| NoError || Operation was successfull
 +
|-
 +
| 1|| UnknownProxyType || The Proxy or its MetaProxy is not configured correctly (e.g. not using the right Metaclass)
 +
|-
 +
| 2|| NotQueued || The Proxy was not in the correct status (workflow) for the operation
 +
|-
 +
| 3|| TargetInstanceCreationFailed || Creation of a new Targetinstance was not successfull
 +
|-
 +
| 4|| SyncProxyAndTargetDataFailed || An error occured during the update of the data on the target proxy (e.g. wrong data type, etc.)
 +
|-
 +
| 5|| SyncProxyAndTargetReferencesFailed || An error occured during the update of the references of the proxy
 +
|-
 +
| 6|| UnknownTargetType || The TargetType is not configured correctly (e.g. wront Target Meta Class)
 +
|-
 +
| 7|| NoTargetInstanceAvailable || The target object for an proxy is not available any more (only for export)
 +
|-
 +
|}
 +
  
  
Line 65: Line 93:
 
* [[MetaProxy]]
 
* [[MetaProxy]]
 
* [[ProxyMetaProperty]]
 
* [[ProxyMetaProperty]]
 +
* [[ProxyScanner]]
 +
* [[HowTo:Configure_Proxies]]
 +
* [[DocumentProxy]]
  
[[Category:Interfacing]]
+
[[Category:Interfacing|ProxyManager]]

Latest revision as of 14:56, 24 June 2024

The general management of proxies and all available operations for proxy objects are handled via the ProxyManager. The ProxyManager is an UBIK object provided by the Kernel. The UBIK environment object provides access to an instance of an ProxyManager.

Example: Asking the Environment for an ProxyManager instance

// Asking the Environment for an ProxyManager instance.

using UBIK.Kernel;

UBIK.Interface.ProxyManager pxManager = anyUbikObject.Environment.GetProxyManager();
IC Hint square.pngThe ProxyManager can be used in coding / customizing only.
IC Attention.pngThere is no UI support of the ProxyManager (yet).


Example: Maintaining the Import / Export Status of a Proxy object by using a ProxyManager

// Maintaining the Import / Export Status of a Proxy object by using a ProxyManager.

using UBIK.Kernel;
using System.Collections.Generic;

// first we have to have a proxy object
UBIK.Interface.Proxy proxyInstance = GetProxyInstanceFromAnyWhere();                    

// fetching a ProxyManager instance
UBIK.Interface.ProxyManager pxManager = anyUbikObject.Environment.GetProxyManager();

//Queing the proxyInstance for Import
pxManager.QueueForImport(new List<Proxy>() { proxyInstance });

//Queing the proxyInstance for Export
pxManager.QueueForExport(new List<Proxy>() { proxyInstance });


Example: Import / Export a Proxy object by using a ProxyManager

// Import / Export a Proxy object by using a ProxyManager.

using UBIK.Kernel;

// first we have to have a proxy object
UBIK.Interface.Proxy proxyInstance = GetProxyInstanceFromAnyWhere();                    

// fetching a ProxyManager instance
UBIK.Interface.ProxyManager pxManager = anyUbikObject.Environment.GetProxyManager();

//Import Proxy
UBIK.Interface.ProxyUpdateInformation importResult = pxManager.UpdateProxyToUbik( proxyInstance );

//Export Proxy
UBIK.Interface.ProxyExportInformation exportResult =pxManager.UpdateUbikToProxy( proxyInstance );


ProxyUpdateErrorCode

The ProxyUpdateErrorCode property on the ProxyUpdateInformation and ProxyExportInformation provides extended information in case of a not successfull update (export / import). This will help the admin to find inconsistencies in the data. (revision 4 and higher)

Error Value ErrorName Description
0 NoError Operation was successfull
1 UnknownProxyType The Proxy or its MetaProxy is not configured correctly (e.g. not using the right Metaclass)
2 NotQueued The Proxy was not in the correct status (workflow) for the operation
3 TargetInstanceCreationFailed Creation of a new Targetinstance was not successfull
4 SyncProxyAndTargetDataFailed An error occured during the update of the data on the target proxy (e.g. wrong data type, etc.)
5 SyncProxyAndTargetReferencesFailed An error occured during the update of the references of the proxy
6 UnknownTargetType The TargetType is not configured correctly (e.g. wront Target Meta Class)
7 NoTargetInstanceAvailable The target object for an proxy is not available any more (only for export)


See also