Sfoglia il codice sorgente

reorganize source codes under package com.crystaldecisions

sunyj 8 anni fa
parent
commit
3adf4a100e
30 ha cambiato i file con 1616 aggiunte e 819 eliminazioni
  1. 143 0
      crystal-replace-view/src/main/java/com/crystaldecisions/client/helper/ObjectState.java
  2. 34 0
      crystal-replace-view/src/main/java/com/crystaldecisions/client/helper/SDKResourceManager.java
  3. 19 19
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/ActionBuffer.java
  4. 5 5
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/CommunicationChannel.java
  5. 168 0
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/ExceptionHelper.java
  6. 6 6
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/IRemoteAgentEventListener.java
  7. 9 9
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RecordingUtil.java
  8. 104 105
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RemoteAgent.java
  9. 83 0
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RequestBase.java
  10. 39 39
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RequestEntry.java
  11. 17 17
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RequestPriority.java
  12. 111 0
      crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/SaveAsDataDocumentRequest.java
  13. 191 191
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ClientDocument.java
  14. 25 0
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ClientDocumentEvent.java
  15. 1 1
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/DataDefController.java
  16. 1 1
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/DatabaseController.java
  17. 14 0
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/IEnterprisePlugin.java
  18. 2 2
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ParameterFieldController.java
  19. 272 272
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ReportClientDocument.java
  20. 2 2
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ReportDefController.java
  21. 2 2
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ReportObjectController.java
  22. 4 6
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ResultFieldController.java
  23. 13 13
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/RowsetController.java
  24. 18 18
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/SubreportClientDocument.java
  25. 2 2
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/SubreportController.java
  26. 18 18
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/a9.java
  27. 89 89
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/b9.java
  28. 1 1
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/cd.java
  29. 1 1
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ds.java
  30. 222 0
      crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/document/SummaryInfo.java

+ 143 - 0
crystal-replace-view/src/main/java/com/crystaldecisions/client/helper/ObjectState.java

@@ -0,0 +1,143 @@
+package com.crystaldecisions.client.helper;
+
+/**
+ * @author sunyj
+ * @since 2017/12/27 8:49
+ */
+
+import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;
+import java.util.Locale;
+
+public class ObjectState {
+    private int readyToProcess;
+    private int newV;
+    private int tryV;
+    private int ifV;
+    private int gotoV;
+    private int caseV;
+    private String Error_DocIsNotOpen;
+    private String Error_DocIsOpening;
+    private String Error_DocIsClosing;
+    private String Error_DocIsClosed;
+    private String Error_DocIsOpenedAlready;
+    private Locale locale;
+
+    public ObjectState(Locale var1, int var2, String var3, int var4, String var5, int var6, String var7, int var8, String var9, int var10, String var11) {
+        this.readyToProcess = ObjectStateEnum.undefined.value();
+        this.newV = 0;
+        this.tryV = 0;
+        this.ifV = 0;
+        this.gotoV = 0;
+        this.caseV = 0;
+        this.Error_DocIsNotOpen = null;
+        this.Error_DocIsOpening = null;
+        this.Error_DocIsClosing = null;
+        this.Error_DocIsClosed = null;
+        this.Error_DocIsOpenedAlready = null;
+        this.locale = null;
+        this.locale = var1;
+        this.newV = var2;
+        this.tryV = var4;
+        this.ifV = var6;
+        this.gotoV = var8;
+        this.caseV = var10;
+        this.Error_DocIsNotOpen = var3;
+        this.Error_DocIsOpening = var5;
+        this.Error_DocIsClosing = var7;
+        this.Error_DocIsClosed = var9;
+        this.Error_DocIsOpenedAlready = var11;
+    }
+
+    public void enter() throws ReportSDKException {
+        if (!isReadyToProcess(this.readyToProcess)) {
+            this.ifM(this.readyToProcess);
+        }
+
+        ++this.readyToProcess;
+    }
+
+    public int getObjectState() {
+        return this.readyToProcess;
+    }
+
+    public static boolean isProcessing(int var0) {
+        return var0 > 0;
+    }
+
+    public static boolean isReadyToProcess(int var0) {
+        return var0 >= 0;
+    }
+
+    public void leave() throws ReportSDKException {
+        --this.readyToProcess;
+    }
+
+    private void ifM(int var1) throws ReportSDKException {
+        if (var1 == -4) {
+            if (this.Error_DocIsNotOpen != null) {
+                this.a(this.newV, this.Error_DocIsNotOpen);
+            }
+        } else if (var1 == -3) {
+            if (this.Error_DocIsOpening != null) {
+                this.a(this.tryV, this.Error_DocIsOpening);
+            }
+        } else if (var1 == -2) {
+            if (this.Error_DocIsClosing != null) {
+                this.a(this.ifV, this.Error_DocIsClosing);
+            }
+        } else if (var1 == -1 && this.Error_DocIsClosed != null) {
+            this.a(this.gotoV, this.Error_DocIsClosed);
+        }
+
+    }
+
+    public void reset() {
+        this.a(-4);
+    }
+
+    public void setLocale(Locale var1) {
+        this.locale = var1;
+    }
+
+    private void a(int var1) {
+        if (!isProcessing(this.readyToProcess)) {
+            this.readyToProcess = var1;
+        }
+
+    }
+
+    public void started() {
+        this.a(0);
+    }
+
+    public void starting() throws ReportSDKException {
+        int var1 = this.getObjectState();
+        if (var1 != -4) {
+            if (var1 == 0) {
+                this.a(this.caseV, this.Error_DocIsOpenedAlready);
+            } else {
+                this.ifM(var1);
+            }
+        }
+
+        this.a(-3);
+    }
+
+    public void stopped() {
+        this.a(-1);
+    }
+
+    public void stopping() throws ReportSDKException {
+        int var1 = this.getObjectState();
+        if (!isReadyToProcess(var1)) {
+            this.ifM(var1);
+        }
+
+        this.a(-2);
+    }
+
+    private void a(int var1, String var2) throws ReportSDKException {
+        String var3 = SDKResourceManager.getString(var2, this.locale);
+        ReportSDKException.throwReportSDKException(var1, var3);
+    }
+}

+ 34 - 0
crystal-replace-view/src/main/java/com/crystaldecisions/client/helper/SDKResourceManager.java

@@ -0,0 +1,34 @@
+package com.crystaldecisions.client.helper;
+
+/**
+ * @author sunyj
+ * @since 2017/12/27 9:00
+ */
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class SDKResourceManager extends ResourceManager {
+    public SDKResourceManager() {
+    }
+
+    public static ResourceBundle getResource(Locale locale) {
+        return ResourceManager.getResource("sdkErrorStrings", locale);
+    }
+
+    public static String getString(String key, Locale locale) throws MissingResourceException {
+        return ResourceManager.getString("sdkErrorStrings", key, locale);
+    }
+
+    public static String getStringWithParams(String key, Locale locale, Object[] params) {
+        String value = getString(key, locale);
+        if (params == null) {
+            return value;
+        } else {
+            MessageFormat messageFormat = new MessageFormat(value);
+            return messageFormat.format(params);
+        }
+    }
+}

+ 19 - 19
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/ActionBuffer.java

@@ -12,25 +12,25 @@ import java.util.Iterator;
 public class ActionBuffer extends ArrayList<IRequestAction> {
     private int doV = 0;
     private ArrayList a = new ArrayList();
-    private TransactionInfo ifV = null;
+    private TransactionInfo transactionInfo = null;
 
     public ActionBuffer() {
     }
 
-    public ActionBuffer(int var1) {
-        super(var1);
+    public ActionBuffer(int initialCapacity) {
+        super(initialCapacity);
     }
 
     public int a() {
         if (this.doV == 0) {
-            if (this.ifV == null) {
-                this.ifV = new TransactionInfo();
+            if (this.transactionInfo == null) {
+                this.transactionInfo = new TransactionInfo();
             } else {
-                this.ifV.ifM(0);
-                this.ifV.a(0);
+                this.transactionInfo.ifM(0);
+                this.transactionInfo.a(0);
             }
 
-            this.ifV.ifM(this.size());
+            this.transactionInfo.ifM(this.size());
         }
 
         ++this.doV;
@@ -38,27 +38,27 @@ public class ActionBuffer extends ArrayList<IRequestAction> {
     }
 
     public CompoundRequest forM() {
-        CompoundRequest var1 = new CompoundRequest();
-        var1.setID(RequestID.compoundRequest);
-        Iterator var2 = this.iterator();
+        CompoundRequest compoundRequest = new CompoundRequest();
+        compoundRequest.setID(RequestID.compoundRequest);
+        Iterator iterator = this.iterator();
 
-        while(var2.hasNext()) {
-            IRequestAction var3 = (IRequestAction)var2.next();
-            var1.add(var3.forM());
+        while(iterator.hasNext()) {
+            IRequestAction iRequestAction = (IRequestAction)iterator.next();
+            compoundRequest.add(iRequestAction.forM());
         }
 
-        return var1;
+        return compoundRequest;
     }
 
     public int doM() {
         --this.doV;
         if (this.doV == 0) {
-            this.ifV.a(this.size() - 1);
-            if (this.ifV.ifM() <= this.ifV.a()) {
-                this.a.add(this.ifV);
+            this.transactionInfo.a(this.size() - 1);
+            if (this.transactionInfo.ifM() <= this.transactionInfo.a()) {
+                this.a.add(this.transactionInfo);
             }
 
-            this.ifV = null;
+            this.transactionInfo = null;
         }
 
         return this.doV;

+ 5 - 5
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/CommunicationChannel.java

@@ -67,17 +67,17 @@ public class CommunicationChannel {
         this.doV.remove(var1);
     }
 
-    public ResultInfo a(ISecurityContext var1, String var2, int var3, int var4, IXMLSerializable var5, RequestPriority var6) throws ReportSDKException {
-        if (var6.a() > 10) {
+    public ResultInfo a(ISecurityContext iSecurityContext, String docId, int requestId, int options, IXMLSerializable ixmlSerializable, RequestPriority requestPriority) throws ReportSDKException {
+        if (requestPriority.getRequestPriority() > 10) {
             throw new IndexOutOfBoundsException();
         } else {
             try {
                 if (this.ifV && this.forV != null) {
-                    RequestEntry var7 = new RequestEntry(var1, var2, var3, var4, var5, var6);
+                    RequestEntry var7 = new RequestEntry(iSecurityContext, docId, requestId, options, ixmlSerializable, requestPriority);
                     RecordingUtil.a(this.forV, var7);
                 }
 
-                CommandObject var13 = new CommandObject(var3, var5);
+                CommandObject var13 = new CommandObject(requestId, ixmlSerializable);
                 this.a.execute(var13);
                 ResultInfo var8 = (ResultInfo)var13.getOutput();
                 if (var8 == null) {
@@ -89,7 +89,7 @@ public class CommunicationChannel {
 
                 if (this.ifV && this.forV != null) {
                     boolean var9 = ClientSDKOptions.m_RequestRecordingOptions.m_RecordSucceededResultDetails;
-                    boolean var10 = var9 || var8.getResultCode() != 0 || var3 == 3;
+                    boolean var10 = var9 || var8.getResultCode() != 0 || requestId == 3;
                     RecordingUtil.a(this.forV, var8, var10);
                 }
 

+ 168 - 0
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/ExceptionHelper.java

@@ -0,0 +1,168 @@
+package com.crystaldecisions.proxy.remoteagent;
+
+/**
+ * @author sunyj
+ * @since 2017/12/27 11:04
+ */
+
+import com.crystaldecisions.client.helper.SDKResourceManager;
+import com.crystaldecisions.sdk.occa.report.lib.ReportSDKEnterpriseLogonException;
+import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;
+import com.crystaldecisions.sdk.occa.report.lib.ReportSDKLogonException;
+import com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException;
+import com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerError;
+import com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException;
+import java.util.Locale;
+import java.util.MissingResourceException;
+
+public final class ExceptionHelper {
+    public ExceptionHelper() {
+    }
+
+    public static String loadResultCodeMsg(int resultCode, Locale locale) throws MissingResourceException {
+        String var2 = null;
+        switch(resultCode) {
+            case -2147467259:
+                var2 = SDKResourceManager.getString("Error_Failed", locale);
+                break;
+            case -2147467231:
+                var2 = SDKResourceManager.getString("Error_NotSupported", locale);
+                break;
+            case -2147352565:
+                var2 = SDKResourceManager.getString("Error_InvalidIndex", locale);
+                break;
+            case -2147217407:
+                var2 = SDKResourceManager.getString("Error_ServerUnavailable", locale);
+                break;
+            case -2147217406:
+                var2 = SDKResourceManager.getString("Error_Cancelled", locale);
+                break;
+            case -2147217405:
+                var2 = SDKResourceManager.getString("Error_NullResultInfo", locale);
+                break;
+            case -2147217404:
+                var2 = SDKResourceManager.getString("Error_ServerOutOfMemory", locale);
+                break;
+            case -2147217403:
+                var2 = SDKResourceManager.getString("Error_ServerConfigError", locale);
+                break;
+            case -2147217402:
+                var2 = SDKResourceManager.getString("Error_DirectoryItemLogOnFailed", locale);
+                break;
+            case -2147217401:
+                var2 = SDKResourceManager.getString("Error_AgentTimeOut", locale);
+                break;
+            case -2147217400:
+                var2 = SDKResourceManager.getString("Error_VersionTooNew", locale);
+                break;
+            case -2147217399:
+                var2 = SDKResourceManager.getString("Error_VersionTooOld", locale);
+                break;
+            case -2147217398:
+                var2 = SDKResourceManager.getString("Error_InvalidChartType", locale);
+                break;
+            case -2147217397:
+                var2 = SDKResourceManager.getString("Error_VerifyLogonFailed", locale);
+                break;
+            case -2147217395:
+                var2 = SDKResourceManager.getString("Error_ServerProgrammingError", locale);
+                break;
+            case -2147217394:
+                var2 = SDKResourceManager.getString("Error_MissingParameterValueError", locale);
+                break;
+            case -2147217393:
+                var2 = SDKResourceManager.getString("Error_LogOnFailed", locale);
+                break;
+            case -2147217392:
+                var2 = SDKResourceManager.getString("Error_FileExists", locale);
+                break;
+            case -2147217391:
+                var2 = SDKResourceManager.getString("Error_DirectoryItemLogOnFailed", locale);
+                break;
+            case -2147217386:
+                var2 = SDKResourceManager.getString("Error_ExceedAgentLimit", locale);
+                break;
+            case -2147217385:
+                var2 = SDKResourceManager.getString("Error_RequestTimeout", locale);
+                break;
+            case -2147217384:
+                var2 = SDKResourceManager.getString("Error_ExceedLicenceLimit", locale);
+                break;
+            case -2147217383:
+                var2 = SDKResourceManager.getString("Error_FormulaParseError", locale);
+                break;
+            case -2147217380:
+                var2 = SDKResourceManager.getString("Error_OldVersionReport", locale);
+                break;
+            case 0:
+                var2 = SDKResourceManager.getString("Error_Succeeded", locale);
+                break;
+            case 266241:
+                var2 = SDKResourceManager.getString("Error_Warning", locale);
+                break;
+            case 266242:
+                var2 = SDKResourceManager.getString("Error_LinkWarning", locale);
+                break;
+            case 266245:
+                var2 = SDKResourceManager.getString("Error_OlderVersion", locale);
+                break;
+            case 266246:
+                var2 = SDKResourceManager.getString("Error_NewerVersion", locale);
+                break;
+            case 266247:
+                var2 = SDKResourceManager.getString("Error_ExceedLicenseLimit", locale);
+                break;
+            default:
+                if (ResultCode.FAILED(resultCode)) {
+                    var2 = SDKResourceManager.getString("Error_Failed", locale);
+                } else if (ResultCode.SUCCEEDED(resultCode)) {
+                    var2 = SDKResourceManager.getString("Error_Warning", locale);
+                }
+        }
+
+        return var2;
+    }
+
+    public static void throwResultInfoException(ResultInfo resultInfo, Locale locale) throws ReportSDKException {
+        int resultCode = resultInfo.getResultCode();
+        ReportSDKException var3 = resultInfo.getErrorException();
+        if (var3 != null) {
+            throw var3;
+        } else {
+            String var4;
+            try {
+                var4 = resultInfo.getErrorMsg(true);
+                if (var4.length() == 0) {
+                    var4 = loadResultCodeMsg(resultCode, locale);
+                }
+
+                switch(resultCode) {
+                    case -2147217402:
+                    case -2147217393:
+                    case -2147217391:
+                        ReportSDKLogonException.throwReportSDKLogonException(resultCode, var4);
+                        break;
+                    case -2147217397:
+                        ReportSDKEnterpriseLogonException.throwReportSDKEnterpriseLogonException(resultCode, var4);
+                        break;
+                    case -2147217394:
+                        ReportSDKParameterFieldException.throwReportSDKParameterFieldException(resultCode, var4);
+                    case -2147217401:
+                    case -2147217400:
+                    case -2147217399:
+                    case -2147217398:
+                    case -2147217396:
+                    case -2147217395:
+                    case -2147217392:
+                    default:
+                        ReportSDKServerException.throwReportSDKServerException(resultCode, var4);
+                }
+            } catch (IndexOutOfBoundsException var6) {
+                resultCode = ReportSDKServerError.failed.value();
+                var4 = resultInfo.getErrorMsg();
+                ReportSDKServerException.throwReportSDKServerException(resultCode, var4);
+            }
+
+        }
+    }
+}

+ 6 - 6
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/IRemoteAgentEventListener.java

@@ -8,15 +8,15 @@ package com.crystaldecisions.proxy.remoteagent;
 import java.util.EventListener;
 
 public interface IRemoteAgentEventListener extends EventListener {
-    void forM(RemoteAgentEvent var1);
+    void onSavingDocument(RemoteAgentEvent remoteAgentEvent);
 
-    void doM(RemoteAgentEvent var1);
+    void doM(RemoteAgentEvent remoteAgentEvent);
 
-    void ifM(RemoteAgentEvent var1);
+    void ifM(RemoteAgentEvent remoteAgentEvent);
 
-    void newM(RemoteAgentEvent var1);
+    void newM(RemoteAgentEvent remoteAgentEvent);
 
-    void a(RemoteAgentEvent var1);
+    void a(RemoteAgentEvent remoteAgentEvent);
 
-    void intM(RemoteAgentEvent var1);
+    void intM(RemoteAgentEvent remoteAgentEvent);
 }

+ 9 - 9
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RecordingUtil.java

@@ -145,33 +145,33 @@ public class RecordingUtil {
             throw new NullPointerException();
         } else {
             int var2 = b;
-            var1.a(var2);
+            var1.setDoV(var2);
             a(var0, "<Request InstanceID=\"");
             a(var0, var2);
             a(var0, "\" AgentID=\"");
-            a(var0, var1.intM());
+            a(var0, var1.getDocId());
             a(var0, "\" RequestID=\"");
-            a(var0, var1.doM());
+            a(var0, var1.getRequestId());
             a(var0, "\" Options=\"");
-            a(var0, var1.newM());
+            a(var0, var1.getRequestOptions());
             a(var0, "\" Priority=\"");
-            a(var0, var1.ifM().a());
+            a(var0, var1.getRequestPriority().getRequestPriority());
             a(var0, "\" Time=\"");
             Calendar var3 = Calendar.getInstance();
             Date var4 = var3.getTime();
             a(var0, XMLConverter.getDateString(var4));
             a(var0, "\">\n\r");
             a(var0, "\t<SecurityContext>\n\r");
-            if (var1.byteM() != null) {
+            if (var1.getISecurityContext() != null) {
                 a(var0, "\t\t");
-                a(var0, (IXMLSerializable)var1.byteM());
+                a(var0, (IXMLSerializable)var1.getISecurityContext());
             }
 
             a(var0, "\t</SecurityContext>\n\r");
             a(var0, "\t<Detail>\n\r");
-            if (var1.tryM() != null) {
+            if (var1.getIXMLSerializable() != null) {
                 a(var0, "\t\t");
-                a(var0, var1.tryM());
+                a(var0, var1.getIXMLSerializable());
             }
 
             a(var0, "\t</Detail>\n\r");

+ 104 - 105
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RemoteAgent.java

@@ -18,30 +18,30 @@ import java.util.Locale;
 import java.util.Vector;
 
 public class RemoteAgent implements IRemoteAgent {
-    private CommunicationChannel tryV = null;
-    private ISecurityContext newV = new SecurityContext();
-    private Locale forV = Locale.getDefault();
-    private ActionBuffer ifV;
-    private Vector intV = new Vector();
+    private CommunicationChannel communicationChannel = null;
+    private ISecurityContext iSecurityContext = new SecurityContext();
+    private Locale locale = Locale.getDefault();
+    private ActionBuffer actionBuffer;
+    private Vector vector = new Vector();
     private boolean a = false;
     private boolean doV = false;
 
-    public RemoteAgent(Agent var1) {
-        this.tryV = new CommunicationChannel(var1);
-        this.forV = this.tryV.ifM();
-        this.doV = var1 instanceof RemoteAgent.a;
-        this.ifV = this.doV ? new ActionBuffer(1) : new ActionBuffer();
+    public RemoteAgent(Agent agent) {
+        this.communicationChannel = new CommunicationChannel(agent);
+        this.locale = this.communicationChannel.ifM();
+        this.doV = agent instanceof InternalImplementionAgent;
+        this.actionBuffer = this.doV ? new ActionBuffer(1) : new ActionBuffer();
     }
 
     public void a(IRemoteAgentEventListener var1) {
-        this.intV.add(var1);
+        this.vector.add(var1);
     }
 
     public void ifM() {
-        ActionBuffer var2 = this.ifV;
+        ActionBuffer var2 = this.actionBuffer;
         int var1;
-        synchronized(this.ifV) {
-            var1 = this.ifV.a();
+        synchronized(this.actionBuffer) {
+            var1 = this.actionBuffer.a();
         }
 
         this.intM(new RemoteAgentEvent(this, (ResultInfo)null, var1));
@@ -50,127 +50,126 @@ public class RemoteAgent implements IRemoteAgent {
     public void a(Agent var1) {
         if (var1 == null) {
             throw new NullPointerException();
-        } else if (this.tryV == null) {
-            this.tryV = new CommunicationChannel(var1);
+        } else if (this.communicationChannel == null) {
+            this.communicationChannel = new CommunicationChannel(var1);
         }
     }
 
     public void doM() {
-        ActionBuffer var2 = this.ifV;
+        ActionBuffer var2 = this.actionBuffer;
         int var1;
-        synchronized(this.ifV) {
-            var1 = this.ifV.ifM();
-            this.ifV.doM();
+        synchronized(this.actionBuffer) {
+            var1 = this.actionBuffer.ifM();
+            this.actionBuffer.doM();
         }
 
         this.newM(new RemoteAgentEvent(this, (ResultInfo)null, var1));
     }
 
-    private void doM(RemoteAgentEvent var1) {
-        for(int var2 = 0; var2 < this.intV.size(); ++var2) {
-            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.intV.elementAt(var2);
-            var3.forM(var1);
+    private void bindListenersOnSavingDocumentEvent(RemoteAgentEvent remoteAgentEvent) {
+        for(int i = 0; i < this.vector.size(); ++i) {
+            IRemoteAgentEventListener iRemoteAgentEventListener = (IRemoteAgentEventListener)this.vector.elementAt(i);
+            iRemoteAgentEventListener.onSavingDocument(remoteAgentEvent);
         }
 
     }
 
-    private void forM(RemoteAgentEvent var1) {
-        for(int var2 = 0; var2 < this.intV.size(); ++var2) {
-            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.intV.elementAt(var2);
-            var3.doM(var1);
+    private void forM(RemoteAgentEvent remoteAgentEvent) {
+        for(int i = 0; i < this.vector.size(); ++i) {
+            IRemoteAgentEventListener iRemoteAgentEventListener = (IRemoteAgentEventListener)this.vector.elementAt(i);
+            iRemoteAgentEventListener.doM(remoteAgentEvent);
         }
 
     }
 
     private void a(RemoteAgentEvent var1) {
-        for(int var2 = 0; var2 < this.intV.size(); ++var2) {
-            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.intV.elementAt(var2);
+        for(int var2 = 0; var2 < this.vector.size(); ++var2) {
+            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.vector.elementAt(var2);
             var3.ifM(var1);
         }
 
     }
 
     private void ifM(RemoteAgentEvent var1) {
-        for(int var2 = 0; var2 < this.intV.size(); ++var2) {
-            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.intV.elementAt(var2);
+        for(int var2 = 0; var2 < this.vector.size(); ++var2) {
+            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.vector.elementAt(var2);
             var3.newM(var1);
         }
 
     }
 
     private void intM(RemoteAgentEvent var1) {
-        for(int var2 = 0; var2 < this.intV.size(); ++var2) {
-            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.intV.elementAt(var2);
+        for(int var2 = 0; var2 < this.vector.size(); ++var2) {
+            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.vector.elementAt(var2);
             var3.a(var1);
         }
 
     }
 
     private void newM(RemoteAgentEvent var1) {
-        for(int var2 = 0; var2 < this.intV.size(); ++var2) {
-            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.intV.elementAt(var2);
+        for(int var2 = 0; var2 < this.vector.size(); ++var2) {
+            IRemoteAgentEventListener var3 = (IRemoteAgentEventListener)this.vector.elementAt(var2);
             var3.intM(var1);
         }
 
     }
 
     private void charM() throws ReportSDKException {
-        ActionBuffer var2 = this.ifV;
-        ActionBuffer var1;
-        synchronized(this.ifV) {
-            if (this.ifV.size() == 0) {
+        ActionBuffer actionBuffer;
+        synchronized(this.actionBuffer) {
+            if (this.actionBuffer.size() == 0) {
                 return;
             }
 
-            var1 = this.ifV;
-            this.ifV = this.doV ? new ActionBuffer(1) : new ActionBuffer();
+            actionBuffer = this.actionBuffer;
+            this.actionBuffer = this.doV ? new ActionBuffer(1) : new ActionBuffer();
         }
 
-        CompoundRequest var6 = var1.forM();
-        this.forM(new RemoteAgentEvent(this, (ResultInfo)null, 0));
-        ResultInfo var3 = this.a(var6.getID().value(), var6.getOptions(), var6, RequestPriority.tryV);
-        int var4 = var3.getResultCode();
-        this.a(var1, var3);
-        if (ResultCode.FAILED(var4)) {
-            ExceptionHelper.throwResultInfoException(var3, this.forV);
+        CompoundRequest compoundRequest = actionBuffer.forM();
+        this.forM(new RemoteAgentEvent(this, null, 0));
+        ResultInfo resultInfo = this.a(compoundRequest.getID().value(), compoundRequest.getOptions(), compoundRequest, RequestPriority.NORMAL);
+        int resultCode = resultInfo.getResultCode();
+        this.a(actionBuffer, resultInfo);
+        if (ResultCode.FAILED(resultCode)) {
+            ExceptionHelper.throwResultInfoException(resultInfo, this.locale);
         }
 
     }
 
     public void newM() throws ReportSDKException {
-        CommunicationChannel var1 = this.tryV;
-        if (var1 == null) {
-            String var2 = SDKResourceManager.getString("Error_CommunicationChannelNotSet", this.forV);
-            ReportSDKServerException.throwReportSDKServerException(-2147217389, var2);
+        CommunicationChannel communicationChannel = this.communicationChannel;
+        if (communicationChannel == null) {
+            String errorMessage = SDKResourceManager.getString("Error_CommunicationChannelNotSet", this.locale);
+            ReportSDKServerException.throwReportSDKServerException(-2147217389, errorMessage);
         }
 
         this.charM();
     }
 
     public void a(boolean var1) {
-        this.tryV = null;
-        this.ifV = null;
-        this.forV = null;
-        this.intV = null;
-        this.newV = null;
+        this.communicationChannel = null;
+        this.actionBuffer = null;
+        this.locale = null;
+        this.vector = null;
+        this.iSecurityContext = null;
     }
 
     public CommunicationChannel a() {
-        return this.tryV;
+        return this.communicationChannel;
     }
 
     public Locale forM() {
-        return this.forV;
+        return this.locale;
     }
 
     public ISecurityContext caseM() {
-        return this.newV;
+        return this.iSecurityContext;
     }
 
     public int tryM() {
-        ActionBuffer var1 = this.ifV;
-        synchronized(this.ifV) {
-            return this.ifV.ifM();
+        ActionBuffer var1 = this.actionBuffer;
+        synchronized(this.actionBuffer) {
+            return this.actionBuffer.ifM();
         }
     }
 
@@ -178,24 +177,24 @@ public class RemoteAgent implements IRemoteAgent {
         return var1 != null && var1.length() > 0;
     }
 
-    private void a(ActionBuffer var1, ResultInfo var2) throws ReportSDKException {
+    private void a(ActionBuffer actionBuffer, ResultInfo resultInfo) throws ReportSDKException {
         try {
-            int var3 = var2.getResultCode();
-            if (var3 != -2147217401) {
-                if (ResultCode.FAILED(var3)) {
-                    int var4 = -1;
-                    if (var2 instanceof CompoundResultInfo) {
-                        CompoundResultInfo var5 = (CompoundResultInfo)var2;
-                        var4 = var5.getFailedRequestIndex();
+            int resultCode = resultInfo.getResultCode();
+            if (resultCode != -2147217401) {
+                if (ResultCode.FAILED(resultCode)) {
+                    int failedRequestIndex = -1;
+                    if (resultInfo instanceof CompoundResultInfo) {
+                        CompoundResultInfo var5 = (CompoundResultInfo)resultInfo;
+                        failedRequestIndex = var5.getFailedRequestIndex();
                     }
 
-                    this.a(var1, var4);
+                    this.a(actionBuffer, failedRequestIndex);
                 } else {
-                    var1.doM(var1.size() - 1);
+                    actionBuffer.doM(actionBuffer.size() - 1);
                 }
             }
         } finally {
-            this.doM(new RemoteAgentEvent(this, var2, 0));
+            this.bindListenersOnSavingDocumentEvent(new RemoteAgentEvent(this, resultInfo, 0));
         }
 
     }
@@ -270,15 +269,15 @@ public class RemoteAgent implements IRemoteAgent {
     }
 
     public void ifM(IRequestAction var1) throws ReportSDKException {
-        this.doM(var1);
+        this.bindListenersOnSavingDocumentEvent(var1);
     }
 
-    private void doM(IRequestAction var1) throws ReportSDKException {
+    private void bindListenersOnSavingDocumentEvent(IRequestAction var1) throws ReportSDKException {
         boolean var2 = !this.a;
         if (var2) {
-            ActionBuffer var3 = this.ifV;
-            synchronized(this.ifV) {
-                this.ifV.add(var1);
+            ActionBuffer var3 = this.actionBuffer;
+            synchronized(this.actionBuffer) {
+                this.actionBuffer.add(var1);
             }
         }
 
@@ -290,16 +289,16 @@ public class RemoteAgent implements IRemoteAgent {
             }
 
         } catch (ReportSDKException var9) {
-            var4 = this.ifV;
-            synchronized(this.ifV) {
-                this.ifV.remove(var1);
+            var4 = this.actionBuffer;
+            synchronized(this.actionBuffer) {
+                this.actionBuffer.remove(var1);
             }
 
             throw var9;
         } catch (RuntimeException var10) {
-            var4 = this.ifV;
-            synchronized(this.ifV) {
-                this.ifV.remove(var1);
+            var4 = this.actionBuffer;
+            synchronized(this.actionBuffer) {
+                this.actionBuffer.remove(var1);
             }
 
             throw var10;
@@ -307,7 +306,7 @@ public class RemoteAgent implements IRemoteAgent {
     }
 
     public void ifM(IRemoteAgentEventListener var1) {
-        this.intV.remove(var1);
+        this.vector.remove(var1);
     }
 
     private void a(IRequestAction var1, boolean var2) throws ReportSDKException {
@@ -316,52 +315,52 @@ public class RemoteAgent implements IRemoteAgent {
             RequestBase var3 = var1.ifM();
             int var4 = var3.getID().value();
             int var5 = var3.getOptions();
-            ResultInfo var6 = this.a(var4, var5, var3, RequestPriority.a);
+            ResultInfo var6 = this.a(var4, var5, var3, RequestPriority.MAX);
             if (ResultCode.FAILED(var6.getResultCode())) {
-                ExceptionHelper.throwResultInfoException(var6, this.forV);
+                ExceptionHelper.throwResultInfoException(var6, this.locale);
             }
         }
 
     }
 
-    public ResultInfo a(int var1, int var2, IXMLSerializable var3, RequestPriority var4) throws ReportSDKException {
-        CommunicationChannel var5 = this.tryV;
-        ISecurityContext var6 = this.newV;
-        if (var5 == null) {
-            String var7 = SDKResourceManager.getString("Error_CommunicationChannelNotSet", this.forV);
-            ReportSDKServerException.throwReportSDKServerException(-2147217389, var7);
+    public ResultInfo a(int requestId, int options, IXMLSerializable ixmlSerializable, RequestPriority requestPriority) throws ReportSDKException {
+        CommunicationChannel communicationChannel = this.communicationChannel;
+        ISecurityContext securityContext = this.iSecurityContext;
+        if (communicationChannel == null) {
+            String errorMessage = SDKResourceManager.getString("Error_CommunicationChannelNotSet", this.locale);
+            ReportSDKServerException.throwReportSDKServerException(-2147217389, errorMessage);
         }
 
-        return var5.a(var6, (String)null, var1, var2, var3, var4);
+        return communicationChannel.a(securityContext, null, requestId, options, ixmlSerializable, requestPriority);
     }
 
     public void intM() throws ReportSDKException {
-        this.a(1, 0, (IXMLSerializable)null, RequestPriority.a);
+        this.a(1, 0, (IXMLSerializable)null, RequestPriority.MAX);
     }
 
     public ResultInfo a(CompoundRequest var1) throws ReportSDKException {
         byte var2 = 2;
         int var3 = var1.getOptions();
-        ResultInfo var4 = this.a(var2, var3, var1, RequestPriority.tryV);
+        ResultInfo var4 = this.a(var2, var3, var1, RequestPriority.NORMAL);
         int var5 = var4.getResultCode();
         if (ResultCode.FAILED(var5)) {
-            ExceptionHelper.throwResultInfoException(var4, this.forV);
+            ExceptionHelper.throwResultInfoException(var4, this.locale);
         }
 
         return var4;
     }
 
     public void a(Locale var1) {
-        this.forV = var1;
+        this.locale = var1;
     }
 
     public void a(ISecurityContext var1) {
-        this.newV = var1;
+        this.iSecurityContext = var1;
     }
 
     public void a(IRequestAction var1) throws ReportSDKException {
         ReverseAction var2 = new ReverseAction(var1);
-        this.doM((IRequestAction)var2);
+        this.bindListenersOnSavingDocumentEvent((IRequestAction)var2);
     }
 
     public boolean byteM() {
@@ -393,7 +392,7 @@ public class RemoteAgent implements IRemoteAgent {
     }
 
     static Agent a(Locale var0, String var1) throws ClassNotFoundException, InstantiationException, IllegalAccessException, ReportSDKException {
-        return new RemoteAgent.a(var0, var1);
+        return new InternalImplementionAgent(var0, var1);
     }
 
     static Agent ifM(Locale var0, String var1, String var2) throws ClassNotFoundException, InstantiationException, IllegalAccessException, ReportSDKException {
@@ -402,10 +401,10 @@ public class RemoteAgent implements IRemoteAgent {
         return var4.createAgent(var0, var1, var2);
     }
 
-    static class a implements Agent {
+    static class InternalImplementionAgent implements Agent {
         private Agent a = null;
 
-        a(Locale var1, String var2) throws ClassNotFoundException, InstantiationException, IllegalAccessException, ReportSDKException {
+        InternalImplementionAgent(Locale var1, String var2) throws ClassNotFoundException, InstantiationException, IllegalAccessException, ReportSDKException {
             if (var2 != null) {
                 if (var2.startsWith("rassdk://")) {
                     var2 = var2.substring("rassdk://".length());

+ 83 - 0
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RequestBase.java

@@ -0,0 +1,83 @@
+package com.crystaldecisions.proxy.remoteagent;
+
+/**
+ * @author sunyj
+ * @since 2017/12/27 10:09
+ */
+
+import com.crystaldecisions.xml.serialization.IXMLSerializable;
+import com.crystaldecisions.xml.serialization.XMLConverter;
+import com.crystaldecisions.xml.serialization.XMLSerializationContext;
+import com.crystaldecisions.xml.serialization.XMLWriter;
+import org.xml.sax.Attributes;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Properties;
+
+public abstract class RequestBase implements IXMLSerializable {
+    private int id = -1;
+    private int options = 0;
+
+    public RequestBase() {
+    }
+
+    public Object createMember(String var1, Attributes attributes, XMLSerializationContext xmlSerializationContext, Map var4, boolean[] var5) {
+        return null;
+    }
+
+    public void endElement(String var1, Map var2) {
+    }
+
+    public RequestID getID() {
+        return RequestID.from_int(this.id);
+    }
+
+    public int getIDValue() {
+        return this.id;
+    }
+
+    public int getOptions() {
+        return this.options;
+    }
+
+    public Object getReqObject() {
+        return null;
+    }
+
+    public void readElement(String var1, String var2, Attributes attributes, Map var4) {
+        if (var1.equals("ID")) {
+            this.id = XMLConverter.getInt(var2);
+        } else if (var1.equals("Options")) {
+            this.options = XMLConverter.getInt(var2);
+        }
+
+    }
+
+    public void save(XMLWriter xmlWriter, XMLSerializationContext xmlSerializationContext) throws IOException {
+    }
+
+    public void save(XMLWriter xmlWriter, String var2, XMLSerializationContext xmlSerializationContext) throws IOException {
+        this.saveContents(xmlWriter, xmlSerializationContext);
+    }
+
+    public void saveContents(XMLWriter xmlWriter, XMLSerializationContext xmlSerializationContext) throws IOException {
+        xmlWriter.writeIntElement("ID", this.id, (Properties)null);
+        xmlWriter.writeIntElement("Options", this.options, (Properties)null);
+    }
+
+    public void setID(RequestID requestID) {
+        this.id = requestID.value();
+    }
+
+    public void setID(int id) {
+        this.id = id;
+    }
+
+    public void setOptions(int options) {
+        this.options = options;
+    }
+
+    public void startElement(String var1, Map var2, Attributes var3) {
+    }
+}

+ 39 - 39
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RequestEntry.java

@@ -9,78 +9,78 @@ import com.crystaldecisions.client.helper.ISecurityContext;
 import com.crystaldecisions.xml.serialization.IXMLSerializable;
 
 public class RequestEntry {
-    private ISecurityContext byteV = null;
-    private String ifV = null;
-    private int newV = 0;
-    private int a = 0;
-    private RequestPriority intV;
-    private IXMLSerializable tryV;
-    private ResultInfo forV;
+    private ISecurityContext iSecurityContext = null;
+    private String docId = null;
+    private int requestId = 0;
+    private int requestOptions = 0;
+    private RequestPriority requestPriority;
+    private IXMLSerializable ixmlSerializable;
+    private ResultInfo resultInfo;
     private int doV;
 
     public RequestEntry() {
-        this.intV = RequestPriority.a;
-        this.tryV = null;
-        this.forV = null;
+        this.requestPriority = RequestPriority.MAX;
+        this.ixmlSerializable = null;
+        this.resultInfo = null;
         this.doV = 0;
     }
 
-    public RequestEntry(ISecurityContext var1, String var2, int var3, int var4, IXMLSerializable var5, RequestPriority var6) {
-        this.intV = RequestPriority.a;
-        this.tryV = null;
-        this.forV = null;
+    public RequestEntry(ISecurityContext iSecurityContext, String docId, int requestId, int requestOptions, IXMLSerializable ixmlSerializable, RequestPriority requestPriority) {
+        this.requestPriority = RequestPriority.MAX;
+        this.ixmlSerializable = null;
+        this.resultInfo = null;
         this.doV = 0;
-        this.ifV = var2;
-        this.byteV = var1;
-        this.newV = var3;
-        this.a = var4;
-        this.tryV = var5;
-        this.intV = var6;
+        this.docId = docId;
+        this.iSecurityContext = iSecurityContext;
+        this.requestId = requestId;
+        this.requestOptions = requestOptions;
+        this.ixmlSerializable = ixmlSerializable;
+        this.requestPriority = requestPriority;
     }
 
-    public String intM() {
-        return this.ifV;
+    public String getDocId() {
+        return this.docId;
     }
 
-    public RequestPriority ifM() {
-        return this.intV;
+    public RequestPriority getRequestPriority() {
+        return this.requestPriority;
     }
 
     public int forM() {
         return this.doV;
     }
 
-    public IXMLSerializable tryM() {
-        return this.tryV;
+    public IXMLSerializable getIXMLSerializable() {
+        return this.ixmlSerializable;
     }
 
-    public int doM() {
-        return this.newV;
+    public int getRequestId() {
+        return this.requestId;
     }
 
-    public int newM() {
-        return this.a;
+    public int getRequestOptions() {
+        return this.requestOptions;
     }
 
-    public ResultInfo a() {
-        return this.forV;
+    public ResultInfo getResultInfo() {
+        return this.resultInfo;
     }
 
-    public ISecurityContext byteM() {
-        return this.byteV;
+    public ISecurityContext getISecurityContext() {
+        return this.iSecurityContext;
     }
 
-    public void a(int var1) {
-        this.doV = var1;
+    public void setDoV(int doV) {
+        this.doV = doV;
     }
 
-    public void a(ResultInfo var1) {
-        this.forV = var1;
+    public void setResultInfo(ResultInfo resultInfo) {
+        this.resultInfo = resultInfo;
     }
 
     public String toString() {
         String var1 = "CRequestEntry[ReqID: ";
-        var1 = var1 + (new Integer(this.newV)).toString() + ", ReqOptions: " + (new Integer(this.a)).toString() + ", DocID: " + this.ifV + ", Priority: " + this.intV.toString();
+        var1 = var1 + (new Integer(this.requestId)).toString() + ", ReqOptions: " + (new Integer(this.requestOptions)).toString() + ", DocID: " + this.docId + ", Priority: " + this.requestPriority.toString();
         return var1;
     }
 }

+ 17 - 17
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/RequestPriority.java

@@ -6,33 +6,33 @@ package com.crystaldecisions.proxy.remoteagent;
  */
 
 public final class RequestPriority {
-    public static final int doV = 10;
-    public static final int ifV = 5;
-    public static final int newV = 1;
-    public static final RequestPriority a = new RequestPriority(10);
-    public static final RequestPriority tryV = new RequestPriority(5);
-    public static final RequestPriority intV = new RequestPriority(1);
-    private int forV = 5;
+    public static final int PRIORITY_MAX = 10;
+    public static final int PRIORITY_NORMAL = 5;
+    public static final int PRIORITY_MIN = 1;
+    public static final RequestPriority MAX = new RequestPriority(10);
+    public static final RequestPriority NORMAL = new RequestPriority(5);
+    public static final RequestPriority MIN = new RequestPriority(1);
+    private int priority = 5;
 
-    private RequestPriority(int var1) {
-        this.forV = var1;
+    private RequestPriority(int priority) {
+        this.priority = priority;
     }
 
-    public static final RequestPriority a(int var0) {
-        switch(var0) {
+    public static final RequestPriority getRequestPriority(int priority) {
+        switch(priority) {
             case 1:
-                return intV;
+                return MIN;
             case 5:
-                return tryV;
+                return NORMAL;
             case 10:
-                return a;
+                return MAX;
             default:
                 throw new IndexOutOfBoundsException();
         }
     }
 
     public String toString() {
-        switch(this.forV) {
+        switch(this.priority) {
             case 1:
                 return "Min";
             case 5:
@@ -44,7 +44,7 @@ public final class RequestPriority {
         }
     }
 
-    public int a() {
-        return this.forV;
+    public int getRequestPriority() {
+        return this.priority;
     }
 }

+ 111 - 0
crystal-replace-view/src/main/java/com/crystaldecisions/proxy/remoteagent/SaveAsDataDocumentRequest.java

@@ -0,0 +1,111 @@
+package com.crystaldecisions.proxy.remoteagent;
+
+/**
+ * @author sunyj
+ * @since 2017/12/27 10:12
+ */
+
+import com.crystaldecisions.client.helper.XMLSerializationHelper;
+import com.crystaldecisions.sdk.occa.report.document.ISummaryInfo;
+import com.crystaldecisions.sdk.occa.report.lib.PropertyBag;
+import com.crystaldecisions.xml.serialization.*;
+import org.xml.sax.Attributes;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Properties;
+
+public class SaveAsDataDocumentRequest extends RequestBase {
+    private String displayName = null;
+    private PropertyBag parentFolderUID = null;
+    private boolean overwrite = false;
+    private ISummaryInfo summaryInfo = null;
+
+    public SaveAsDataDocumentRequest() {
+    }
+
+    public Object createMember(String var1, Attributes var2, XMLSerializationContext var3, Map var4, boolean[] var5) {
+        Object var6 = ClassFactory.createObject(var2, var3, var5);
+        if (var1.equals("ParentFolderUID")) {
+            if (var6 != null) {
+                this.parentFolderUID = (PropertyBag)var6;
+            }
+        } else if (var1.equals("SummaryInfo") && var6 != null) {
+            this.summaryInfo = (ISummaryInfo)var6;
+        }
+
+        return var6;
+    }
+
+    public String getDisplayName() {
+        if (this.displayName == null) {
+            this.displayName = "";
+        }
+
+        return this.displayName;
+    }
+
+    public boolean getOverwrite() {
+        return this.overwrite;
+    }
+
+    public PropertyBag getParentFolderUID() {
+        if (this.parentFolderUID == null) {
+            this.parentFolderUID = new PropertyBag();
+        }
+
+        return this.parentFolderUID;
+    }
+
+    public ISummaryInfo getSummaryInfo() {
+        return this.summaryInfo;
+    }
+
+    public void readElement(String var1, String var2, Attributes attributes, Map var4) {
+        super.readElement(var1, var2, attributes, var4);
+        if (var1.equals("DisplayName")) {
+            this.displayName = var2;
+        } else if (var1.equals("Overwrite")) {
+            this.overwrite = XMLConverter.getBooleanValue(var2);
+        }
+
+    }
+
+    public void save(XMLWriter xmlWriter, XMLSerializationContext xmlSerializationContext) throws IOException {
+        String var3 = XMLConverter.getXMLFromClassName(this.getClass().getName());
+        Properties var4 = XMLSerializationHelper.getHeaderAttributes(var3);
+        xmlWriter.writeStartElement("CrystalAnalysis.SaveAsDataDocumentRequest", var4);
+        this.saveContents(xmlWriter, xmlSerializationContext);
+        xmlWriter.writeEndElement("CrystalAnalysis.SaveAsDataDocumentRequest");
+    }
+
+    public void save(XMLWriter xmlWriter, String var2, XMLSerializationContext xmlSerializationContext) throws IOException {
+        xmlWriter.writeStartObjectElement(var2, "2", this, xmlSerializationContext);
+        this.saveContents(xmlWriter, xmlSerializationContext);
+        xmlWriter.writeEndElement(var2);
+    }
+
+    public void saveContents(XMLWriter xmlWriter, XMLSerializationContext xmlSerializationContext) throws IOException {
+        super.saveContents(xmlWriter, xmlSerializationContext);
+        xmlWriter.writeBooleanElement("Overwrite", this.overwrite, (Properties)null);
+        xmlWriter.writeObjectElement(this.parentFolderUID, "ParentFolderUID", xmlSerializationContext);
+        xmlWriter.writeTextElement("DisplayName", this.displayName, (Properties)null);
+        xmlWriter.writeObjectElement((IXMLSerializable)this.summaryInfo, "SummaryInfo", xmlSerializationContext);
+    }
+
+    public void setDisplayName(String displayName) {
+        this.displayName = displayName;
+    }
+
+    public void setOverwrite(boolean overwrite) {
+        this.overwrite = overwrite;
+    }
+
+    public void setParentFolderUID(PropertyBag parentFolderUID) {
+        this.parentFolderUID = parentFolderUID;
+    }
+
+    public void setSummaryInfo(ISummaryInfo summaryInfo) {
+        this.summaryInfo = summaryInfo;
+    }
+}

+ 191 - 191
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ClientDocument.java

@@ -25,57 +25,57 @@ import java.util.TimeZone;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 public abstract class ClientDocument implements IReportAppService {
-    private static final ILogger byteV = TraceManager.getLogger("com.crystaldecisions.sdk.occa.report.application.ReportClientDocument");
+    private static final ILogger iLogger = TraceManager.getLogger("com.crystaldecisions.sdk.occa.report.application.ReportClientDocument");
     public static final String URIPROTOCAL_RAS = "ras://";
     public static final String URIPROTOCAL_RASSDK = "rassdk://";
     public static final String URIPROTOCAL_CEIS = "ceis://";
     public static final String URIPROTOCAL_CECUID = "cecuid:///";
-    private Locale f = Locale.getDefault();
-    private TimeZone voidV = null;
-    private ReportAppSession c = null;
-    private RemoteAgent tryV = null;
+    private Locale locale = Locale.getDefault();
+    private TimeZone timeZone = null;
+    private ReportAppSession reportAppSession = null;
+    private RemoteAgent remoteAgent = null;
     private boolean g = false;
-    private IUndoUnit charV = null;
-    private IUndoManager d = null;
-    private List<IClientDocumentEventListener> longV = new CopyOnWriteArrayList();
-    private List<IAdvancedClientDocumentEventListener> e = new CopyOnWriteArrayList();
-    private ObjectState elseV = null;
-    protected IEnterprisePlugin gotoV = null;
+    private IUndoUnit iUndoUnit = null;
+    private IUndoManager iUndoManager = null;
+    private List<IClientDocumentEventListener> iClientDocumentEventListeners = new CopyOnWriteArrayList();
+    private List<IAdvancedClientDocumentEventListener> iAdvancedClientDocumentEventListeners = new CopyOnWriteArrayList();
+    private ObjectState objectState = null;
+    protected IEnterprisePlugin iEnterprisePlugin = null;
     protected boolean caseV = false;
 
     public ClientDocument() {
-        this.tryM();
+        this.bindListenersOnPropertyChangedEvent();
     }
 
     public ClientDocument(IEnterprisePlugin var1) {
-        this.tryM();
-        this.gotoV = var1;
+        this.bindListenersOnPropertyChangedEvent();
+        this.iEnterprisePlugin = var1;
     }
 
-    private void tryM() {
-        this.elseV = new ObjectState(this.f, -2147215349, "Error_DocIsNotOpen", -2147215349, "Error_DocIsOpening", -2147215349, "Error_DocIsClosing", -2147215349, "Error_DocIsClosed", -2147215348, "Error_DocIsOpenedAlready");
+    private void bindListenersOnPropertyChangedEvent() {
+        this.objectState = new ObjectState(this.locale, -2147215349, "Error_DocIsNotOpen", -2147215349, "Error_DocIsOpening", -2147215349, "Error_DocIsClosing", -2147215349, "Error_DocIsClosed", -2147215348, "Error_DocIsOpenedAlready");
     }
 
     public void addClientDocumentEventListener(IClientDocumentEventListener var1) {
-        this.longV.add(var1);
+        this.iClientDocumentEventListeners.add(var1);
     }
 
     public void addAdvancedClientDocumentEventListener(IAdvancedClientDocumentEventListener var1) {
-        this.e.add(var1);
+        this.iAdvancedClientDocumentEventListeners.add(var1);
     }
 
     public void close() throws ReportSDKException {
-        boolean var1 = this.forM(new ClientDocumentEvent(this, (String)null));
+        boolean var1 = this.initializeReportAppSession(new ClientDocumentEvent(this, (String)null));
         if (!var1) {
-            int var2 = this.elseV.getObjectState();
+            int var2 = this.objectState.getObjectState();
             if (var2 != -1 && var2 != -4) {
-                this.elseV.stopping();
-                this.intM(new ClientDocumentEvent(this, (String)null));
+                this.objectState.stopping();
+                this.getRemoteAgent(new ClientDocumentEvent(this, (String)null));
                 this.caseM();
-                    this.c = null;
+                    this.reportAppSession = null;
                     this.charM();
                     this.newM(new ClientDocumentEvent(this, (String)null));
-                    this.elseV.stopped();
+                    this.objectState.stopped();
             }
 
         }
@@ -87,10 +87,10 @@ public abstract class ClientDocument implements IReportAppService {
 
     abstract void newM() throws ReportSDKException;
 
-    abstract void a(PropertyBag var1, int var2) throws ReportSDKException;
+    abstract void abcd(PropertyBag var1, int var2) throws ReportSDKException;
 
     private void newM(ClientDocumentEvent var1) {
-        Iterator var2 = this.longV.iterator();
+        Iterator var2 = this.iClientDocumentEventListeners.iterator();
 
         while(var2.hasNext()) {
             IClientDocumentEventListener var3 = (IClientDocumentEventListener)var2.next();
@@ -99,8 +99,8 @@ public abstract class ClientDocument implements IReportAppService {
 
     }
 
-    private void intM(ClientDocumentEvent var1) {
-        Iterator var2 = this.longV.iterator();
+    private void getRemoteAgent(ClientDocumentEvent var1) {
+        Iterator var2 = this.iClientDocumentEventListeners.iterator();
 
         while(var2.hasNext()) {
             IClientDocumentEventListener var3 = (IClientDocumentEventListener)var2.next();
@@ -109,8 +109,8 @@ public abstract class ClientDocument implements IReportAppService {
 
     }
 
-    private boolean forM(ClientDocumentEvent var1) {
-        Iterator var2 = this.longV.iterator();
+    private boolean initializeReportAppSession(ClientDocumentEvent var1) {
+        Iterator var2 = this.iClientDocumentEventListeners.iterator();
 
         boolean var4;
         do {
@@ -125,89 +125,89 @@ public abstract class ClientDocument implements IReportAppService {
         return true;
     }
 
-    boolean a(ClientDocumentEvent var1) {
-        Iterator var2 = this.longV.iterator();
+    boolean bindListenersOnPreSavingEvent(ClientDocumentEvent clientDocumentEvent) {
+        Iterator iterator = this.iClientDocumentEventListeners.iterator();
 
         boolean var4;
         do {
-            if (!var2.hasNext()) {
+            if (!iterator.hasNext()) {
                 return false;
             }
 
-            IClientDocumentEventListener var3 = (IClientDocumentEventListener)var2.next();
-            var4 = var3.preSaving(var1);
+            IClientDocumentEventListener iClientDocumentEventListener = (IClientDocumentEventListener)iterator.next();
+            var4 = iClientDocumentEventListener.preSaving(clientDocumentEvent);
         } while(!var4);
 
         return true;
     }
 
-    void tryM(ClientDocumentEvent var1) {
-        Iterator var2 = this.longV.iterator();
+    void bindListenersOnPropertyChangedEvent(ClientDocumentEvent clientDocumentEvent) {
+        Iterator iterator = this.iClientDocumentEventListeners.iterator();
 
-        while(var2.hasNext()) {
-            IClientDocumentEventListener var3 = (IClientDocumentEventListener)var2.next();
-            var3.onPropertyChanged(var1);
+        while(iterator.hasNext()) {
+            IClientDocumentEventListener iClientDocumentEventListener = (IClientDocumentEventListener)iterator.next();
+            iClientDocumentEventListener.onPropertyChanged(clientDocumentEvent);
         }
 
     }
 
-    void byteM(ClientDocumentEvent var1) {
-        Iterator var2 = this.longV.iterator();
+    void bindListenersOnPropertyChangingEvent(ClientDocumentEvent clientDocumentEvent) {
+        Iterator iterator = this.iClientDocumentEventListeners.iterator();
 
-        while(var2.hasNext()) {
-            IClientDocumentEventListener var3 = (IClientDocumentEventListener)var2.next();
-            var3.onPropertyChanging(var1);
+        while(iterator.hasNext()) {
+            IClientDocumentEventListener iClientDocumentEventListener = (IClientDocumentEventListener)iterator.next();
+            iClientDocumentEventListener.onPropertyChanging(clientDocumentEvent);
         }
 
     }
 
-    void doM(ClientDocumentEvent var1) {
-        Iterator var2 = this.longV.iterator();
+    void bindListensOnSavedEvent(ClientDocumentEvent clientDocumentEvent) {
+        Iterator iterator = this.iClientDocumentEventListeners.iterator();
 
-        while(var2.hasNext()) {
-            IClientDocumentEventListener var3 = (IClientDocumentEventListener)var2.next();
-            var3.onSaved(var1);
+        while(iterator.hasNext()) {
+            IClientDocumentEventListener iClientDocumentEventListener = (IClientDocumentEventListener)iterator.next();
+            iClientDocumentEventListener.onSaved(clientDocumentEvent);
         }
 
     }
 
-    void ifM(ClientDocumentEvent var1) {
-        Iterator var2 = this.longV.iterator();
+    void bindListenersOnSavingEvent(ClientDocumentEvent clientDocumentEvent) {
+        Iterator iterator = this.iClientDocumentEventListeners.iterator();
 
-        while(var2.hasNext()) {
-            IClientDocumentEventListener var3 = (IClientDocumentEventListener)var2.next();
-            var3.onSaving(var1);
+        while(iterator.hasNext()) {
+            IClientDocumentEventListener iClientDocumentEventListener = (IClientDocumentEventListener)iterator.next();
+            iClientDocumentEventListener.onSaving(clientDocumentEvent);
         }
 
     }
 
-    void doM(AdvancedClientDocumentEvent var1) {
-        if (var1 != null) {
-            Iterator var2 = this.e.iterator();
+    void bindListensOnSavedEvent(AdvancedClientDocumentEvent advancedClientDocumentEvent) {
+        if (advancedClientDocumentEvent != null) {
+            Iterator iterator = this.iAdvancedClientDocumentEventListeners.iterator();
 
-            while(var2.hasNext()) {
-                IAdvancedClientDocumentEventListener var3 = (IAdvancedClientDocumentEventListener)var2.next();
-                var3.onRemoved(var1);
+            while(iterator.hasNext()) {
+                IAdvancedClientDocumentEventListener iAdvancedClientDocumentEventListener = (IAdvancedClientDocumentEventListener)iterator.next();
+                iAdvancedClientDocumentEventListener.onRemoved(advancedClientDocumentEvent);
             }
 
         }
     }
 
-    void ifM(AdvancedClientDocumentEvent var1) {
-        if (var1 != null) {
-            Iterator var2 = this.e.iterator();
+    void bindListenersOnSavingEvent(AdvancedClientDocumentEvent advancedClientDocumentEvent) {
+        if (advancedClientDocumentEvent != null) {
+            Iterator iterator = this.iAdvancedClientDocumentEventListeners.iterator();
 
-            while(var2.hasNext()) {
-                IAdvancedClientDocumentEventListener var3 = (IAdvancedClientDocumentEventListener)var2.next();
-                var3.onAdded(var1);
+            while(iterator.hasNext()) {
+                IAdvancedClientDocumentEventListener iAdvancedClientDocumentEventListener = (IAdvancedClientDocumentEventListener)iterator.next();
+                iAdvancedClientDocumentEventListener.onAdded(advancedClientDocumentEvent);
             }
 
         }
     }
 
-    void a(AdvancedClientDocumentEvent var1) {
+    void bindListenersOnChangedEvent(AdvancedClientDocumentEvent var1) {
         if (var1 != null) {
-            Iterator var2 = this.e.iterator();
+            Iterator var2 = this.iAdvancedClientDocumentEventListeners.iterator();
 
             while(var2.hasNext()) {
                 IAdvancedClientDocumentEventListener var3 = (IAdvancedClientDocumentEventListener)var2.next();
@@ -217,62 +217,62 @@ public abstract class ClientDocument implements IReportAppService {
         }
     }
 
-    PropertyBag a(Object var1) throws ReportSDKException {
-        if (var1 == null) {
+    PropertyBag bindListenersOnPreSavingEvent(Object parentFolderPath) throws ReportSDKException {
+        if (parentFolderPath == null) {
             return null;
         } else {
-            boolean var2 = false;
-            if (var1 instanceof Number) {
-                var2 = true;
+            boolean isNumberOrIFolderOrIReport = false;
+            if (parentFolderPath instanceof Number) {
+                isNumberOrIFolderOrIReport = true;
             } else {
-                Class[] var3 = var1.getClass().getInterfaces();
+                Class[] interfaces = parentFolderPath.getClass().getInterfaces();
 
-                for(int var4 = 0; var4 < var3.length; ++var4) {
-                    Class var5 = var3[var4];
-                    if (var5.getName().indexOf("com.crystaldecisions.sdk.plugin.desktop.folder.IFolder") != -1 || var5.getName().indexOf("com.crystaldecisions.sdk.plugin.desktop.report.IReport") != -1) {
-                        var2 = true;
+                for(int i = 0; i < interfaces.length; ++i) {
+                    Class anInterface = interfaces[i];
+                    if (anInterface.getName().indexOf("com.crystaldecisions.sdk.plugin.desktop.folder.IFolder") != -1 || anInterface.getName().indexOf("com.crystaldecisions.sdk.plugin.desktop.report.IReport") != -1) {
+                        isNumberOrIFolderOrIReport = true;
                         break;
                     }
                 }
             }
 
-            PropertyBag var6 = null;
-            String var7 = null;
-            if (var2 && this.gotoV != null) {
-                var7 = this.gotoV.getObjectURI(var1, this.f);
-            } else if (var1 instanceof Agent) {
-                var7 = "";
-            } else if (var1 instanceof String) {
-                var7 = (String)var1;
+            PropertyBag propertyBag = null;
+            String objectURI;
+            if (isNumberOrIFolderOrIReport && this.iEnterprisePlugin != null) {
+                objectURI = this.iEnterprisePlugin.getObjectURI(parentFolderPath, this.locale);
+            } else if (parentFolderPath instanceof Agent) {
+                objectURI = "";
+            } else if (parentFolderPath instanceof String) {
+                objectURI = (String)parentFolderPath;
             } else {
-                if (!(var1 instanceof PropertyBag)) {
+                if (!(parentFolderPath instanceof PropertyBag)) {
                     throw new IllegalArgumentException();
                 }
 
-                var6 = (PropertyBag)var1;
-                var7 = var6.getStringValue("path");
+                propertyBag = (PropertyBag)parentFolderPath;
+                objectURI = propertyBag.getStringValue("path");
             }
 
-            if (var6 == null) {
-                var6 = new PropertyBag();
+            if (propertyBag == null) {
+                propertyBag = new PropertyBag();
             }
 
-            boolean var8 = true;
-            if (var7 != null) {
-                var6.put("path", var7);
-                if (var7.toLowerCase().startsWith("rassdk://")) {
-                    var8 = false;
+            boolean isRemoteDoc = true;
+            if (objectURI != null) {
+                propertyBag.put("path", objectURI);
+                if (objectURI.toLowerCase().startsWith("rassdk://")) {
+                    isRemoteDoc = false;
                 }
             }
 
-            var6.putBooleanValue("isremotedoc", var8);
-            return var6;
+            propertyBag.putBooleanValue("isremotedoc", isRemoteDoc);
+            return propertyBag;
         }
     }
 
     public boolean getIsModified() throws ReportSDKException {
         try {
-            this.elseV.enter();
+            this.objectState.enter();
         } catch (ReportSDKException var4) {
             ReportSDKClientDocException.throwReportSDKClientDocException(var4.errorCode(), var4.getMessage());
         }
@@ -283,89 +283,89 @@ public abstract class ClientDocument implements IReportAppService {
         } else if (var1) {
             IUndoManager var2 = this.getUndoManager();
             IUndoUnit var3 = var2.getLastUndoUnit();
-            if (var3 == this.charV && !var2.isOpen()) {
+            if (var3 == this.iUndoUnit && !var2.isOpen()) {
                 var1 = false;
                 this.g = false;
             }
         }
 
-        this.elseV.leave();
+        this.objectState.leave();
         return var1;
     }
 
     public Locale getLocale() {
-        return this.f;
+        return this.locale;
     }
 
-    ObjectState byteM() {
-        return this.elseV;
+    ObjectState bindListenersOnPropertyChangingEvent() {
+        return this.objectState;
     }
 
-    RemoteAgent intM() {
-        return this.tryV;
+    RemoteAgent getRemoteAgent() {
+        return this.remoteAgent;
     }
 
     public String getReportAppServer() {
-        return this.c != null ? this.c.getReportAppServer() : "";
+        return this.reportAppSession != null ? this.reportAppSession.getReportAppServer() : "";
     }
 
     public ReportAppSession getReportAppSession() {
-        if (this.c == null) {
-            this.c = new ReportAppSession();
-            this.c.setLocale(this.f);
-            this.c.a(this.voidV);
+        if (this.reportAppSession == null) {
+            this.reportAppSession = new ReportAppSession();
+            this.reportAppSession.setLocale(this.locale);
+            this.reportAppSession.a(this.timeZone);
         }
 
-        return this.c;
+        return this.reportAppSession;
     }
 
     public IUndoManager getUndoManager() {
-        if (this.d == null) {
-            this.d = new UndoManager();
+        if (this.iUndoManager == null) {
+            this.iUndoManager = new UndoManager();
         }
 
-        return this.d;
+        return this.iUndoManager;
     }
 
-    public void initialize(ReportAppSession var1) throws ReportSDKException {
-        this.setReportAppSession(var1);
+    public void initialize(ReportAppSession reportAppSession) throws ReportSDKException {
+        this.setReportAppSession(reportAppSession);
     }
 
-    void forM() throws ReportSDKException {
-        if (this.c == null) {
-            this.c = new ReportAppSession();
-            this.c.setLocale(this.f);
-            this.c.a(this.voidV);
+    void initializeReportAppSession() throws ReportSDKException {
+        if (this.reportAppSession == null) {
+            this.reportAppSession = new ReportAppSession();
+            this.reportAppSession.setLocale(this.locale);
+            this.reportAppSession.a(this.timeZone);
         }
 
-        this.c.initialize();
+        this.reportAppSession.initialize();
     }
 
-    void a(Agent var1) throws ReportSDKException {
+    void setRemoteAgent(Agent var1) throws ReportSDKException {
         if (var1 == null) {
-            String var2 = SDKResourceManager.getString("Error_InvalidFilePath", this.f);
+            String var2 = SDKResourceManager.getString("Error_InvalidFilePath", this.locale);
             ReportSDKClientDocException.throwReportSDKClientDocException(-2147215358, var2);
         }
 
-        this.tryV = new RemoteAgent(var1);
+        this.remoteAgent = new RemoteAgent(var1);
     }
 
-    void ifM(String var1) throws ReportSDKException {
-        this.tryV = RemoteAgent.a(this.getLocale(), var1, this.getReportAppServer());
+    void bindListenersOnSavingEvent(String var1) throws ReportSDKException {
+        this.remoteAgent = RemoteAgent.a(this.getLocale(), var1, this.getReportAppServer());
     }
 
-    void doM() throws ReportSDKException {
-        if (byteV.isDebugEnabled()) {
-            byteV.debug("initializeServerConnection() is being called");
+    void bindListensOnSavedEvent() throws ReportSDKException {
+        if (iLogger.isDebugEnabled()) {
+            iLogger.debug("initializeServerConnection() is being called");
         }
 
-        this.f = this.tryV.forM();
+        this.locale = this.remoteAgent.forM();
 
-        assert this.c != null;
+        assert this.reportAppSession != null;
 
     }
 
-    static boolean a(String var0) {
+    static boolean startsWithCeisOrCecuid(String var0) {
         if (var0 == null) {
             return false;
         } else {
@@ -378,23 +378,23 @@ public abstract class ClientDocument implements IReportAppService {
     public void newDocument() throws ReportSDKException {
         try {
             try {
-                this.elseV.starting();
+                this.objectState.starting();
             } catch (ReportSDKException var2) {
                 ReportSDKClientDocException.throwReportSDKClientDocException(var2.errorCode(), var2.getMessage());
             }
 
-            this.forM();
-            this.ifM((String)null);
-            this.doM();
+            this.initializeReportAppSession();
+            this.bindListenersOnSavingEvent((String)null);
+            this.bindListensOnSavedEvent();
             this.newM();
-            this.elseV.started();
+            this.objectState.started();
         } catch (ReportSDKException var3) {
-            this.elseV.started();
-            this.elseV.stopping();
+            this.objectState.started();
+            this.objectState.stopping();
             this.caseM();
                 this.charM();
-                this.elseV.stopped();
-                this.elseV.reset();
+                this.objectState.stopped();
+                this.objectState.reset();
                 throw var3;
         }
     }
@@ -402,35 +402,35 @@ public abstract class ClientDocument implements IReportAppService {
     public void open(Object var1, int var2) throws ReportSDKException {
         try {
             try {
-                this.elseV.starting();
+                this.objectState.starting();
             } catch (ReportSDKException var6) {
                 ReportSDKClientDocException.throwReportSDKClientDocException(var6.errorCode(), var6.getMessage());
             }
 
-            PropertyBag var3 = this.a(var1);
-            this.forM();
+            PropertyBag var3 = this.bindListenersOnPreSavingEvent(var1);
+            this.initializeReportAppSession();
             if (var1 instanceof Agent) {
-                this.a((Agent)var1);
+                this.setRemoteAgent((Agent)var1);
             } else {
                 String var4 = (String)var3.get("path");
                 if (var4.length() == 0) {
-                    String var5 = SDKResourceManager.getString("Error_InvalidFilePath", this.f);
+                    String var5 = SDKResourceManager.getString("Error_InvalidFilePath", this.locale);
                     ReportSDKClientDocException.throwReportSDKClientDocException(-2147215358, var5);
                 }
 
-                this.ifM(var4);
+                this.bindListenersOnSavingEvent(var4);
             }
 
-            this.doM();
-            this.a(var3, var2);
-            this.elseV.started();
+            this.bindListensOnSavedEvent();
+            this.abcd(var3, var2);
+            this.objectState.started();
         } catch (ReportSDKException var7) {
-            this.elseV.started();
-            this.elseV.stopping();
+            this.objectState.started();
+            this.objectState.stopping();
             this.caseM();
                 this.charM();
-                this.elseV.stopped();
-                this.elseV.reset();
+                this.objectState.stopped();
+                this.objectState.reset();
                 throw var7;
         }
     }
@@ -438,32 +438,32 @@ public abstract class ClientDocument implements IReportAppService {
     public abstract String path() throws ReportSDKException;
 
     public void removeClientDocumentEventListener(IClientDocumentEventListener var1) {
-        this.longV.remove(var1);
+        this.iClientDocumentEventListeners.remove(var1);
     }
 
     public void removeAdvancedClientDocumentEventListener(IAdvancedClientDocumentEventListener var1) {
-        this.e.remove(var1);
+        this.iAdvancedClientDocumentEventListeners.remove(var1);
     }
 
     public abstract void save() throws IOException, ReportSDKException;
 
     public abstract void saveAs(String var1, Object var2, int var3) throws ReportSDKException, IOException;
 
-    void a(boolean var1) {
-        this.byteM(new ClientDocumentEvent(this, "IsModified"));
+    void abc(boolean var1) {
+        this.bindListenersOnPropertyChangingEvent(new ClientDocumentEvent(this, "IsModified"));
         this.g = var1;
         if (!var1) {
-            this.charV = ((UndoManager)this.getUndoManager()).getLastUndoUnit();
+            this.iUndoUnit = ((UndoManager)this.getUndoManager()).getLastUndoUnit();
         }
 
-        this.tryM(new ClientDocumentEvent(this, "IsModified"));
+        this.bindListenersOnPropertyChangedEvent(new ClientDocumentEvent(this, "IsModified"));
     }
 
     public void setIsModifiedUntilSaved() {
-        this.byteM(new ClientDocumentEvent(this, "IsModified"));
+        this.bindListenersOnPropertyChangingEvent(new ClientDocumentEvent(this, "IsModified"));
         this.g = true;
         this.caseV = true;
-        this.tryM(new ClientDocumentEvent(this, "IsModified"));
+        this.bindListenersOnPropertyChangedEvent(new ClientDocumentEvent(this, "IsModified"));
     }
 
     public void setLocale(Locale var1) throws ReportSDKException {
@@ -471,68 +471,68 @@ public abstract class ClientDocument implements IReportAppService {
             var1 = Locale.getDefault();
         }
 
-        this.f = var1;
-        this.elseV.setLocale(var1);
-        if (this.tryV != null) {
-            this.tryV.a(var1);
+        this.locale = var1;
+        this.objectState.setLocale(var1);
+        if (this.remoteAgent != null) {
+            this.remoteAgent.a(var1);
         }
 
-        if (this.c != null) {
-            this.c.setLocale(var1);
+        if (this.reportAppSession != null) {
+            this.reportAppSession.setLocale(var1);
         }
 
     }
 
     public void setTimeZone(TimeZone var1) throws ReportSDKException {
         if (var1 != null) {
-            this.voidV = var1;
-            if (this.c != null) {
-                this.c.a(var1);
+            this.timeZone = var1;
+            if (this.reportAppSession != null) {
+                this.reportAppSession.a(var1);
             }
         }
 
     }
 
     public void setReportAppServer(String var1) throws ReportSDKException {
-        this.byteM(new ClientDocumentEvent(this, "ReportAppServer"));
-        if (this.c != null) {
-            String var2 = SDKResourceManager.getString("Error_ChangeServer", this.f);
+        this.bindListenersOnPropertyChangingEvent(new ClientDocumentEvent(this, "ReportAppServer"));
+        if (this.reportAppSession != null) {
+            String var2 = SDKResourceManager.getString("Error_ChangeServer", this.locale);
             ReportSDKClientDocException.throwReportSDKClientDocException(-2147215346, var2);
         }
 
-        this.c = new ReportAppSession();
-        this.c.setLocale(this.f);
-        this.c.a(this.voidV);
+        this.reportAppSession = new ReportAppSession();
+        this.reportAppSession.setLocale(this.locale);
+        this.reportAppSession.a(this.timeZone);
         if (var1 != null && var1.length() > 0) {
-            this.c.setReportAppServer(var1);
+            this.reportAppSession.setReportAppServer(var1);
         }
 
-        this.tryM(new ClientDocumentEvent(this, "ReportAppServer"));
+        this.bindListenersOnPropertyChangedEvent(new ClientDocumentEvent(this, "ReportAppServer"));
     }
 
     public void setReportAppSession(ReportAppSession var1) throws ReportSDKException {
-        this.byteM(new ClientDocumentEvent(this, "ReportAppSession"));
+        this.bindListenersOnPropertyChangingEvent(new ClientDocumentEvent(this, "ReportAppSession"));
         Locale var2 = var1.getLocale();
-        if (this.tryV != null) {
+        if (this.remoteAgent != null) {
             String var3 = SDKResourceManager.getString("Error_DocServerConnectionAlreadySetup", var2);
             ReportSDKClientDocException.throwReportSDKClientDocException(-2147215355, var3);
         }
 
-        this.c = var1;
+        this.reportAppSession = var1;
         this.setLocale(var2);
-        this.tryM(new ClientDocumentEvent(this, "ReportAppSession"));
+        this.bindListenersOnPropertyChangedEvent(new ClientDocumentEvent(this, "ReportAppSession"));
     }
 
     public abstract PropertyBag UID() throws ReportSDKException;
 
     void charM() {
-        if (byteV.isDebugEnabled()) {
-            byteV.debug("uninitializeServerConnection() is being called");
+        if (iLogger.isDebugEnabled()) {
+            iLogger.debug("uninitializeServerConnection() is being called");
         }
 
-        if (this.tryV != null) {
-            this.tryV.a(true);
-            this.tryV = null;
+        if (this.remoteAgent != null) {
+            this.remoteAgent.a(true);
+            this.remoteAgent = null;
         }
 
     }

+ 25 - 0
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ClientDocumentEvent.java

@@ -0,0 +1,25 @@
+package com.crystaldecisions.sdk.occa.report.application;
+
+/**
+ * @author sunyj
+ * @since 2017/12/27 8:55
+ */
+
+import java.util.EventObject;
+
+public class ClientDocumentEvent extends EventObject {
+    private String a = null;
+
+    public ClientDocumentEvent(ClientDocument clientDocument, String var2) {
+        super(clientDocument);
+        this.a = var2;
+    }
+
+    public ClientDocument getClientDocument() {
+        return (ClientDocument)this.getSource();
+    }
+
+    public String getPropertyName() {
+        return this.a;
+    }
+}

+ 1 - 1
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/DataDefController.java

@@ -686,7 +686,7 @@ public class DataDefController extends an implements IDataDefController {
             ReportSDKServerException.throwReportSDKServerException(-2147217387, var1);
         }
 
-        ResultInfo var9 = this.doM().a(203, 0, (IXMLSerializable)null, RequestPriority.tryV);
+        ResultInfo var9 = this.doM().a(203, 0, (IXMLSerializable)null, RequestPriority.NORMAL);
         if (ResultCode.FAILED(var9.getResultCode())) {
             ExceptionHelper.throwResultInfoException(var9, this.getLocale());
         }

+ 1 - 1
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/DatabaseController.java

@@ -2040,7 +2040,7 @@ public class DatabaseController extends an implements IDatabaseController {
             ReportSDKException.throwReportSDKException(-2147467259, var2);
         }
 
-        this.k.getMainReport().a(var1);
+        this.k.getMainReport().setName(var1);
     }
 
     private int byteM(String var1) throws ReportSDKException {

+ 14 - 0
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/IEnterprisePlugin.java

@@ -0,0 +1,14 @@
+package com.crystaldecisions.sdk.occa.report.application;
+
+/**
+ * @author sunyj
+ * @since 2017/12/27 9:11
+ */
+import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;
+import java.util.Locale;
+
+public interface IEnterprisePlugin {
+    String getBusinessViewCuid(Object var1, Locale locale) throws ReportSDKException;
+
+    String getObjectURI(Object path, Locale locale) throws ReportSDKException;
+}

+ 2 - 2
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ParameterFieldController.java

@@ -172,7 +172,7 @@ public class ParameterFieldController implements IParameterFieldController {
                         this.a(this.tryV.getDataDefinition().getParameterFields(), var7);
                     } else {
                         ReportClientDocument var12 = (ReportClientDocument)var13;
-                        var12.a(var6, var7);
+                        var12.setName(var6, var7);
                     }
                 }
             } else {
@@ -1262,7 +1262,7 @@ public class ParameterFieldController implements IParameterFieldController {
                 if (var8 != null) {
                     Fields var7 = new Fields();
                     var7.add(var2);
-                    var8.a(var3, var7);
+                    var8.setName(var3, var7);
                 }
 
             }

File diff suppressed because it is too large
+ 272 - 272
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ReportClientDocument.java


+ 2 - 2
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ReportDefController.java

@@ -386,7 +386,7 @@ public class ReportDefController extends an implements IReportDefController {
 
             this.doM().newM();
             this.a((b7)b7.a, (EventObject)(new c2(this, com.crystaldecisions.sdk.occa.report.application.al.doV, var1)));
-            ResultInfo var3 = this.doM().a(RequestID.autoFormatReport.value(), var1.value(), this.H().getDataDefinition().getResultFields(), RequestPriority.tryV);
+            ResultInfo var3 = this.doM().a(RequestID.autoFormatReport.value(), var1.value(), this.H().getDataDefinition().getResultFields(), RequestPriority.NORMAL);
             if (ResultCode.FAILED(var3.getResultCode())) {
                 ExceptionHelper.throwResultInfoException(var3, this.getLocale());
             }
@@ -2034,7 +2034,7 @@ public class ReportDefController extends an implements IReportDefController {
     ResultInfo ifM(IRequestAction var1) throws ReportSDKException {
         RequestBase var2 = var1.forM();
         this.doM().newM();
-        ResultInfo var3 = this.doM().a(var2.getID().value(), 0, var2, RequestPriority.tryV);
+        ResultInfo var3 = this.doM().a(var2.getID().value(), 0, var2, RequestPriority.NORMAL);
         int var4 = var3.getResultCode();
         if (ResultCode.FAILED(var4)) {
             ExceptionHelper.throwResultInfoException(var3, this.getLocale());

+ 2 - 2
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ReportObjectController.java

@@ -1106,7 +1106,7 @@ public class ReportObjectController implements IReportObjectController {
                     var5 = new c1(false);
                 }
             } else if (var1 instanceof ICrossTabObject) {
-                assert var2 instanceof ICrossTabObject : "Changing a crosstab object into a different object!";
+                assert var2 instanceof ICrossTabObject : "Changing bindListenersOnPreSavingEvent crosstab object into bindListenersOnPreSavingEvent different object!";
 
                 var5 = new ac((ICrossTabObject)var1, (ICrossTabObject)var2);
                 var7 = true;
@@ -1137,7 +1137,7 @@ public class ReportObjectController implements IReportObjectController {
             String var5 = ((SubreportObject)var2).getSubreportName();
             String var6 = ((SubreportObject)var4).getSubreportName();
             if (var6 != null && !var6.equalsIgnoreCase(var5)) {
-                this.a.ap.a(var6, var5);
+                this.a.ap.setName(var6, var5);
             }
         }
 

+ 4 - 6
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ResultFieldController.java

@@ -103,7 +103,7 @@ public class ResultFieldController implements IResultFieldController {
             var3 = (IField)var2.clone(true);
             if (var3 instanceof ISummaryField) {
                 ISummaryField var5 = (ISummaryField)var3;
-                this.a(var5);
+                this.ab(var5);
             }
         }
 
@@ -112,8 +112,8 @@ public class ResultFieldController implements IResultFieldController {
     }
 
     // TODO Modified
-    // void a(ISummaryField)
-    int a(ISummaryField var1) throws ReportSDKException {
+    // void setName(ISummaryField)
+    void ab(ISummaryField var1) throws ReportSDKException {
         IGroup var2 = var1.getGroup();
         if (var2 != null) {
             var2 = this.ifV.a(var2);
@@ -160,8 +160,6 @@ public class ResultFieldController implements IResultFieldController {
 
             var1.setSecondarySummarizedField(var9);
         }
-        // TODO Modified
-        return a((IField)var1);
 
     }
 
@@ -236,7 +234,7 @@ public class ResultFieldController implements IResultFieldController {
 
             if (var4 instanceof ISummaryField) {
                 ISummaryField var5 = (ISummaryField)var4;
-                this.a(var5);
+                this.ab(var5);
             }
 
         } else {

+ 13 - 13
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/RowsetController.java

@@ -372,7 +372,7 @@ public class RowsetController extends ds {
             RowsetRequest var14 = this.a(var1, var6, false, var19, var17);
             int var15 = var1 == null ? 1 : 3;
             this.doM().newM();
-            ResultInfo var16 = this.doM().a(108, var15, var14, RequestPriority.tryV);
+            ResultInfo var16 = this.doM().a(108, var15, var14, RequestPriority.NORMAL);
             this.a(var16, var2, var9);
             this.intM(new db(this, bi.ifV, var2, var9));
         }
@@ -386,7 +386,7 @@ public class RowsetController extends ds {
         }
 
         this.doM().newM();
-        ResultInfo var3 = this.doM().a(204, 0, (IXMLSerializable)null, RequestPriority.tryV);
+        ResultInfo var3 = this.doM().a(204, 0, (IXMLSerializable)null, RequestPriority.NORMAL);
         int var2 = var3.getResultCode();
         if (!ResultCode.SUCCEEDED(var2)) {
             ExceptionHelper.throwResultInfoException(var3, this.getLocale());
@@ -447,7 +447,7 @@ public class RowsetController extends ds {
                 RowsetRequest var22 = new RowsetRequest();
                 var13 = this.a(var4, var11, var2, var22);
                 this.doM().newM();
-                ResultInfo var14 = this.doM().a(108, var13, var22, RequestPriority.tryV);
+                ResultInfo var14 = this.doM().a(108, var13, var22, RequestPriority.NORMAL);
                 var5 = this.a((ResultInfo)var14, (IRowset)var5, var20);
             }
 
@@ -600,7 +600,7 @@ public class RowsetController extends ds {
             RowsetRequest var12 = new RowsetRequest();
             var10 = this.a(var1, var8, var3, var12);
             this.doM().newM();
-            ResultInfo var13 = this.doM().a(108, var10, var12, RequestPriority.tryV);
+            ResultInfo var13 = this.doM().a(108, var10, var12, RequestPriority.NORMAL);
             this.a(var13, var2, var6);
             var7 = var5.size() - 1;
         }
@@ -626,7 +626,7 @@ public class RowsetController extends ds {
                 var5.setParameterFields(this.gotoM());
                 int var7 = RowsetRequestOptions.doV.a();
                 this.doM().newM();
-                ResultInfo var8 = this.doM().a(137, var7, var5, RequestPriority.tryV);
+                ResultInfo var8 = this.doM().a(137, var7, var5, RequestPriority.NORMAL);
                 this.a(var8, var1, var2);
                 return var8;
             } else {
@@ -835,7 +835,7 @@ public class RowsetController extends ds {
         int var4 = var1 == null ? 1 : 3;
         RowsetRequest var5 = this.a(var1, var2, true, -1, this.caseV);
         this.doM().newM();
-        ResultInfo var6 = this.doM().a(108, var4, var5, RequestPriority.tryV);
+        ResultInfo var6 = this.doM().a(108, var4, var5, RequestPriority.NORMAL);
         IRowsetMetaData var7 = var5.getMetaData();
         IRowset var9 = this.a(var6, var1, var7);
         RecordBatches var8 = var9.getRecordBatches();
@@ -870,7 +870,7 @@ public class RowsetController extends ds {
         }
 
         this.doM().newM();
-        ResultInfo var15 = this.doM().a(138, var3, var2, RequestPriority.tryV);
+        ResultInfo var15 = this.doM().a(138, var3, var2, RequestPriority.NORMAL);
         IRowset var14 = this.a((ResultInfo)var15, (IRowset)var4, var5);
         if (var6) {
             IRowset var16 = (IRowset)var15.getResultObj();
@@ -964,7 +964,7 @@ public class RowsetController extends ds {
 
         var9.put("ParameterFields", this.gotoM());
         this.doM().newM();
-        ResultInfo var6 = this.doM().a(169, var2 != null ? 1 : 0, var9, RequestPriority.tryV);
+        ResultInfo var6 = this.doM().a(169, var2 != null ? 1 : 0, var9, RequestPriority.NORMAL);
         if (ResultCode.FAILED(var6.getResultCode())) {
             ExceptionHelper.throwResultInfoException(var6, this.getLocale());
         }
@@ -1017,7 +1017,7 @@ public class RowsetController extends ds {
             var3.put("GroupPath", var5);
             var3.put("ParameterFields", this.gotoM());
             this.doM().newM();
-            ResultInfo var4 = this.doM().a(145, 0, var3, RequestPriority.tryV);
+            ResultInfo var4 = this.doM().a(145, 0, var3, RequestPriority.NORMAL);
             if (ResultCode.FAILED(var4.getResultCode())) {
                 ExceptionHelper.throwResultInfoException(var4, this.getLocale());
             }
@@ -1161,7 +1161,7 @@ public class RowsetController extends ds {
         }
 
         this.doM().newM();
-        ResultInfo var5 = this.doM().a(249, 0, (IXMLSerializable)null, RequestPriority.tryV);
+        ResultInfo var5 = this.doM().a(249, 0, (IXMLSerializable)null, RequestPriority.NORMAL);
         int var2 = var5.getResultCode();
         if (!ResultCode.SUCCEEDED(var2)) {
             ExceptionHelper.throwResultInfoException(var5, this.getLocale());
@@ -1318,7 +1318,7 @@ public class RowsetController extends ds {
         RefreshDataRequest var3 = new RefreshDataRequest();
         var3.setMaxNumOfRecords(this.elseV);
         this.doM().newM();
-        ResultInfo var2 = this.doM().a(163, 0, var3, RequestPriority.tryV);
+        ResultInfo var2 = this.doM().a(163, 0, var3, RequestPriority.NORMAL);
         if (ResultCode.FAILED(var2.getResultCode())) {
             ExceptionHelper.throwResultInfoException(var2, this.getLocale());
         }
@@ -1345,7 +1345,7 @@ public class RowsetController extends ds {
             RowsetRequest var3 = new RowsetRequest();
             int var4 = this.a(var1, 2147483647, -1, var3);
             this.doM().newM();
-            ResultInfo var5 = this.doM().a(108, var4, var3, RequestPriority.tryV);
+            ResultInfo var5 = this.doM().a(108, var4, var3, RequestPriority.NORMAL);
             if (var5 != null) {
                 if (ResultCode.FAILED(var5.getResultCode())) {
                     ExceptionHelper.throwResultInfoException(var5, this.getLocale());
@@ -1426,7 +1426,7 @@ public class RowsetController extends ds {
             int var12 = this.a(var1, var10, -1, var11);
             var11.setRowsetMaxRecords(var9);
             this.doM().newM();
-            ResultInfo var13 = this.doM().a(108, var12, var11, RequestPriority.tryV);
+            ResultInfo var13 = this.doM().a(108, var12, var11, RequestPriority.NORMAL);
             this.a(var13, var1, var2, var9, false);
             var8 = var2.getRecordBatches();
             var7 = var8.size();

+ 18 - 18
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/SubreportClientDocument.java

@@ -164,7 +164,7 @@ class SubreportClientDocument implements ISubreportClientDocument {
                 String var6 = this.P.getName();
                 this.X = new SubreportRemoteAgent();
                 this.X.ifM(var6);
-                this.X.a(this.Z.intM());
+                this.X.a(this.Z.getRemoteAgent());
                 this.V.a(this.X);
                 this.R.a(this.X);
                 this.Y.a(this.X);
@@ -258,7 +258,7 @@ class SubreportClientDocument implements ISubreportClientDocument {
     ResultInfo doM(int var1, int var2, IXMLSerializable var3) throws ReportSDKException {
         if (this.X != null) {
             this.X.newM();
-            return this.X.a(var1, var2, var3, RequestPriority.tryV);
+            return this.X.a(var1, var2, var3, RequestPriority.NORMAL);
         } else {
             return null;
         }
@@ -299,10 +299,10 @@ class SubreportClientDocument implements ISubreportClientDocument {
 
                 assert this.getMainReport() != null;
 
-                this.getMainReport().byteM(new ClientDocumentEvent(this.getMainReport(), "ReportOptions"));
+                this.getMainReport().bindListenersOnPropertyChangingEvent(new ClientDocumentEvent(this.getMainReport(), "ReportOptions"));
                 this.P.setReportOptions((IReportOptions)var1.clone(true));
-                this.getMainReport().tryM(new ClientDocumentEvent(this.getMainReport(), "ReportOptions"));
-                this.getMainReport().a(new AdvancedClientDocumentEvent(this.getMainReport(), ClientDocumentChangeType.reportOptions, (String)null, (String)null, this.getName()));
+                this.getMainReport().bindListenersOnPropertyChangedEvent(new ClientDocumentEvent(this.getMainReport(), "ReportOptions"));
+                this.getMainReport().bindListenersOnChangedEvent(new AdvancedClientDocumentEvent(this.getMainReport(), ClientDocumentChangeType.reportOptions, (String)null, (String)null, this.getName()));
             } else {
                 var3 = new ModifyObjectRequest();
                 var3.setID(RequestID.modifyReportDocumentOptions);
@@ -314,14 +314,14 @@ class SubreportClientDocument implements ISubreportClientDocument {
 
                 assert this.getMainReport() != null;
 
-                this.getMainReport().byteM(new ClientDocumentEvent(this.getMainReport(), "ReportOptions"));
+                this.getMainReport().bindListenersOnPropertyChangingEvent(new ClientDocumentEvent(this.getMainReport(), "ReportOptions"));
                 this.P.setReportOptions(var1);
-                this.getMainReport().tryM(new ClientDocumentEvent(this.getMainReport(), "ReportOptions"));
-                this.getMainReport().a(new AdvancedClientDocumentEvent(this.getMainReport(), ClientDocumentChangeType.reportOptions, (String)null, (String)null, this.getName()));
+                this.getMainReport().bindListenersOnPropertyChangedEvent(new ClientDocumentEvent(this.getMainReport(), "ReportOptions"));
+                this.getMainReport().bindListenersOnChangedEvent(new AdvancedClientDocumentEvent(this.getMainReport(), ClientDocumentChangeType.reportOptions, (String)null, (String)null, this.getName()));
             }
 
             if (this.Z != null) {
-                this.Z.a(true);
+                this.Z.abc(true);
             }
 
         } catch (ReportSDKException var5) {
@@ -359,8 +359,8 @@ class SubreportClientDocument implements ISubreportClientDocument {
             this.V.C();
             this.S.elseM();
             this.Q.a(this.P.getDataDefinition().getCustomFunctions());
-            this.Z.tryM(new ClientDocumentEvent(this.Z, "ReportDocument"));
-            this.Z.a(new AdvancedClientDocumentEvent(this.Z, ClientDocumentChangeType.reportDefinition, (String)null, (String)null, this.P.getName()));
+            this.Z.bindListenersOnPropertyChangedEvent(new ClientDocumentEvent(this.Z, "ReportDocument"));
+            this.Z.bindListenersOnChangedEvent(new AdvancedClientDocumentEvent(this.Z, ClientDocumentChangeType.reportDefinition, (String)null, (String)null, this.P.getName()));
         }
 
     }
@@ -382,7 +382,7 @@ class SubreportClientDocument implements ISubreportClientDocument {
             }
 
             String var1 = this.P.getName();
-            PropertyBag var2 = this.Z.a(var1, false);
+            PropertyBag var2 = this.Z.setName(var1, false);
             IReportDocument var3 = (IReportDocument)var2.get("Document");
 
             assert var3 != null;
@@ -392,7 +392,7 @@ class SubreportClientDocument implements ISubreportClientDocument {
             }
 
             this.doM(var3, true);
-            this.Z.a(true);
+            this.Z.abc(true);
         }
 
     }
@@ -462,7 +462,7 @@ class SubreportClientDocument implements ISubreportClientDocument {
 
     void doM(bd var1, IGroupPath var2) {
         if (this.Z != null) {
-            this.Z.a(var1, var2);
+            this.Z.setName(var1, var2);
         }
 
     }
@@ -502,7 +502,7 @@ class SubreportClientDocument implements ISubreportClientDocument {
             try {
                 CheckFormulaNewRequest var5 = new CheckFormulaNewRequest();
                 if (this.Z != null) {
-                    this.Z.a(var1);
+                    this.Z.setName(var1);
                 }
 
                 RequestID var6 = RequestID.checkFormulaRequest;
@@ -518,7 +518,7 @@ class SubreportClientDocument implements ISubreportClientDocument {
                         FormulaErrors var9 = var8.getFormulaErrors();
                         if (var9.size() == 0 && var1 instanceof IFormulaField) {
                             FormulaValueType var10 = var8.getFormulaValueType();
-                            FieldValueType var11 = ReportClientDocument.a(var10);
+                            FieldValueType var11 = ReportClientDocument.setName(var10);
                             IFormulaField var12 = (IFormulaField)var1;
                             if (var11.value() != 255) {
                                 if (var12.getOptions() != var8.getOptions()) {
@@ -602,8 +602,8 @@ class SubreportClientDocument implements ISubreportClientDocument {
         this.doM(330, 0, var2);
         this.T = var1;
         if (this.getMainReport() != null) {
-            this.getMainReport().a(true);
-            this.getMainReport().a(new AdvancedClientDocumentEvent(this.getMainReport(), ClientDocumentChangeType.designerProperties, (String)null, (String)null, this.getName()));
+            this.getMainReport().abc(true);
+            this.getMainReport().bindListenersOnChangedEvent(new AdvancedClientDocumentEvent(this.getMainReport(), ClientDocumentChangeType.designerProperties, (String)null, (String)null, this.getName()));
         }
 
     }

+ 2 - 2
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/SubreportController.java

@@ -208,10 +208,10 @@ public class SubreportController extends an {
         ISubreportObject var3 = (ISubreportObject)var1.get("InsDelGeneric_Object");
         if (this.m.z() == null) {
             IStrings var4 = (IStrings)var1.get("Names");
-            this.m.a(var4);
+            this.m.setName(var4);
         }
 
-        this.m.a(var3.getSubreportName(), var2);
+        this.m.setName(var3.getSubreportName(), var2);
     }
 
     public void setSubreportImportLocation(String var1, String var2) throws ReportSDKException {

+ 18 - 18
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/a9.java

@@ -24,7 +24,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.J();
             if (this.forV != null) {
-                this.forV.ifM(bf.a(this.forV, this.doV.getName(), var1));
+                this.forV.bindListenersOnSavingEvent(bf.a(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -45,7 +45,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
                     this.forV.getReportDefController().a(var2, var3, var4);
                 }
 
-                this.forV.a(bf.a(this.forV, var2, var1));
+                this.forV.bindListenersOnChangedEvent(bf.a(this.forV, var2, var1));
             }
         }
 
@@ -61,7 +61,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
                     this.forV.getReportDefController().a(var2, (FieldMappingInfos)var3);
                 }
 
-                this.forV.a(bf.a(this.forV, var2, var1));
+                this.forV.bindListenersOnChangedEvent(bf.a(this.forV, var2, var1));
             }
         }
 
@@ -89,7 +89,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.J();
             if (this.forV != null) {
-                this.forV.doM(bf.a(this.forV, this.doV.getName(), var1));
+                this.forV.bindListensOnSavedEvent(bf.a(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -116,7 +116,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.K();
             if (this.forV != null) {
-                this.forV.ifM(bf.ifM(this.forV, this.doV.getName(), var1));
+                this.forV.bindListenersOnSavingEvent(bf.ifM(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -131,11 +131,11 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
             if (this.forV != null) {
                 if (var1.a() != ak.elseV && var1.a() != ak.intV) {
                     if (var1.a() == ak.d) {
-                        this.forV.a(new AdvancedClientDocumentEvent(this.forV, ClientDocumentChangeType.reportDefinition, Integer.toString(var1.forM()), (String)null, this.doV.getName()));
+                        this.forV.bindListenersOnChangedEvent(new AdvancedClientDocumentEvent(this.forV, ClientDocumentChangeType.reportDefinition, Integer.toString(var1.forM()), (String)null, this.doV.getName()));
                     } else if (var1.a() == ak.gotoV) {
-                        this.forV.a(new AdvancedClientDocumentEvent(this.forV, ClientDocumentChangeType.group, Integer.toString(var1.forM()), (String)null, this.doV.getName()));
+                        this.forV.bindListenersOnChangedEvent(new AdvancedClientDocumentEvent(this.forV, ClientDocumentChangeType.group, Integer.toString(var1.forM()), (String)null, this.doV.getName()));
                     } else {
-                        this.forV.a(bf.ifM(this.forV, this.doV.getName(), var1));
+                        this.forV.bindListenersOnChangedEvent(bf.ifM(this.forV, this.doV.getName(), var1));
                     }
                 } else {
                     this.doV.C();
@@ -163,7 +163,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.K();
             if (this.forV != null) {
-                this.forV.a(bf.a(this.forV, this.doV.getName(), var1));
+                this.forV.bindListenersOnChangedEvent(bf.a(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -176,7 +176,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.K();
             if (this.forV != null) {
-                this.forV.doM(bf.ifM(this.forV, this.doV.getName(), var1));
+                this.forV.bindListensOnSavedEvent(bf.ifM(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -224,7 +224,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.D();
             if (this.forV != null) {
-                this.forV.ifM(bf.ifM(this.forV, this.doV.getName(), var1));
+                this.forV.bindListenersOnSavingEvent(bf.ifM(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -237,7 +237,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.D();
             if (this.forV != null) {
-                this.forV.a(bf.ifM(this.forV, this.doV.getName(), var1));
+                this.forV.bindListenersOnChangedEvent(bf.ifM(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -250,7 +250,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.D();
             if (this.forV != null) {
-                this.forV.a(bf.ifM(this.forV, this.doV.getName(), var1));
+                this.forV.bindListenersOnChangedEvent(bf.ifM(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -260,7 +260,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.D();
             if (this.forV != null) {
-                this.forV.doM(bf.ifM(this.forV, this.doV.getName(), var1));
+                this.forV.bindListensOnSavedEvent(bf.ifM(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -276,7 +276,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.D();
             if (this.forV != null) {
-                this.forV.a(bf.a(this.forV, this.doV.getName(), var1));
+                this.forV.bindListenersOnChangedEvent(bf.a(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -296,7 +296,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.H();
             if (this.forV != null) {
-                this.forV.ifM(bf.a(this.forV, this.doV.getName(), var1));
+                this.forV.bindListenersOnSavingEvent(bf.a(this.forV, this.doV.getName(), var1));
             }
         }
 
@@ -308,7 +308,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
     public void onChanged(bj var1) throws ReportSDKException {
         if (this.doV != null) {
             if (this.forV != null) {
-                this.forV.a(bf.a(this.forV, this.doV.getName(), var1));
+                this.forV.bindListenersOnChangedEvent(bf.a(this.forV, this.doV.getName(), var1));
             }
 
             this.doV.H();
@@ -326,7 +326,7 @@ class a9 implements IDatabaseControllerEventListener, IDataDefControllerEventLis
         if (this.doV != null) {
             this.doV.H();
             if (this.forV != null) {
-                this.forV.doM(bf.a(this.forV, this.doV.getName(), var1));
+                this.forV.bindListensOnSavedEvent(bf.a(this.forV, this.doV.getName(), var1));
             }
         }
 

+ 89 - 89
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/b9.java

@@ -20,61 +20,61 @@ import com.crystaldecisions.sdk.occa.report.lib.PropertyBag;
 import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;
 
 class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListener, IDatabaseControllerEventListener, IDataDefControllerEventListener, IReportDefControllerEventListener, IRowsetControllerEventListener, ICustomFunctionControllerEventListener, IPrintOutputControllerEventListener {
-    ReportClientDocument ifV = null;
+    ReportClientDocument reportClientDocument = null;
 
     public b9() {
     }
 
-    public void forM(RemoteAgentEvent var1) {
-        if (this.ifV != null) {
-            this.ifV.ifM(var1);
+    public void onSavingDocument(RemoteAgentEvent remoteAgentEvent) {
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.save(remoteAgentEvent);
         }
 
     }
 
-    public void doM(RemoteAgentEvent var1) {
+    public void doM(RemoteAgentEvent remoteAgentEvent) {
     }
 
     public void onAdded(cf var1) {
-        if (this.ifV != null) {
-            this.ifV.v();
-            this.ifV.ifM(bf.a(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.v();
+            this.reportClientDocument.bindListenersOnSavingEvent(bf.a(this.reportClientDocument, "", var1));
         }
 
     }
 
     public void onAdded(c8 var1) {
-        if (this.ifV != null) {
-            this.ifV.i();
-            this.ifV.ifM(bf.ifM(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.i();
+            this.reportClientDocument.bindListenersOnSavingEvent(bf.ifM(this.reportClientDocument, "", var1));
         }
 
     }
 
     public void onAdded(c2 var1) {
-        if (this.ifV != null) {
+        if (this.reportClientDocument != null) {
             Object var2 = var1.a();
             if (var2 instanceof PropertyBag && ((PropertyBag)var2).containsKey("InsDelGeneric_Object")) {
                 Object var3 = ((PropertyBag)var2).get("InsDelGeneric_Object");
                 if (var3 instanceof ISubreportObject) {
                     String var4 = ((ISubreportObject)var3).getSubreportName();
-                    IStrings var5 = this.ifV.z();
+                    IStrings var5 = this.reportClientDocument.z();
                     if (var5 != null && var5.indexOf(var4) < 0) {
                         var5.add(var4);
                     }
                 }
             }
 
-            this.ifV.elseM();
-            this.ifV.ifM(bf.ifM(this.ifV, "", var1));
+            this.reportClientDocument.elseM();
+            this.reportClientDocument.bindListenersOnSavingEvent(bf.ifM(this.reportClientDocument, "", var1));
         }
 
     }
 
     public void onAdded(bj var1) {
-        if (this.ifV != null) {
-            this.ifV.t();
-            this.ifV.ifM(bf.a(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.t();
+            this.reportClientDocument.bindListenersOnSavingEvent(bf.a(this.reportClientDocument, "", var1));
         }
 
     }
@@ -86,8 +86,8 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     }
 
     public void onAdding(c2 var1) {
-        if (this.ifV != null) {
-            this.ifV.elseM();
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.elseM();
         }
 
     }
@@ -96,10 +96,10 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     }
 
     public void onAliasChanged(cf var1) throws ReportSDKException {
-        if (this.ifV != null) {
-            this.ifV.v();
-            this.ifV.ifM(bf.a(this.ifV, "", var1));
-            this.ifV.refreshReportDocument();
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.v();
+            this.reportClientDocument.bindListenersOnSavingEvent(bf.a(this.reportClientDocument, "", var1));
+            this.reportClientDocument.refreshReportDocument();
         }
 
     }
@@ -108,66 +108,66 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     }
 
     public void onCacheStatusChanged(db var1) {
-        if (this.ifV != null) {
-            this.ifV.a(var1.ifM(), var1.charM());
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.setName(var1.ifM(), var1.charM());
         }
 
     }
 
     public void onCacheStatusChanging(db var1) {
-        if (this.ifV != null) {
-            this.ifV.ifM(var1.ifM(), var1.charM());
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.save(var1.ifM(), var1.charM());
         }
 
     }
 
     public void onChanged(bj var1) throws ReportSDKException {
-        if (this.ifV != null) {
-            this.ifV.a(bf.a(this.ifV, "", var1));
-            this.ifV.t();
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.bindListenersOnChangedEvent(bf.a(this.reportClientDocument, "", var1));
+            this.reportClientDocument.t();
             if (var1.a() == b5.ifV) {
-                this.ifV.refreshReportDocument();
+                this.reportClientDocument.refreshReportDocument();
             }
         }
 
     }
 
     public void onChanged(cf var1) throws ReportSDKException {
-        if (this.ifV != null) {
-            this.ifV.v();
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.v();
             if (var1.intM() == cw.caseV && var1.ifM() instanceof IDatabase) {
-                this.ifV.a((IDatabase)var1.ifM());
+                this.reportClientDocument.setName((IDatabase)var1.ifM());
             }
 
-            this.ifV.a(bf.a(this.ifV, "", var1));
+            this.reportClientDocument.bindListenersOnChangedEvent(bf.a(this.reportClientDocument, "", var1));
         }
 
     }
 
     public void onChanged(c8 var1) throws ReportSDKException {
-        if (this.ifV != null) {
-            this.ifV.i();
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.i();
             if (var1.a() != ak.elseV && var1.a() != ak.intV) {
                 if (var1.a() == ak.d) {
-                    this.ifV.a(new AdvancedClientDocumentEvent(this.ifV, ClientDocumentChangeType.reportDefinition, Integer.toString(var1.forM()), (String)null, (String)null));
+                    this.reportClientDocument.bindListenersOnChangedEvent(new AdvancedClientDocumentEvent(this.reportClientDocument, ClientDocumentChangeType.reportDefinition, Integer.toString(var1.forM()), (String)null, (String)null));
                 } else if (var1.a() == ak.gotoV) {
-                    this.ifV.a(new AdvancedClientDocumentEvent(this.ifV, ClientDocumentChangeType.group, Integer.toString(var1.forM()), (String)null, (String)null));
+                    this.reportClientDocument.bindListenersOnChangedEvent(new AdvancedClientDocumentEvent(this.reportClientDocument, ClientDocumentChangeType.group, Integer.toString(var1.forM()), (String)null, (String)null));
                 } else {
-                    this.ifV.a(bf.ifM(this.ifV, "", var1));
+                    this.reportClientDocument.bindListenersOnChangedEvent(bf.ifM(this.reportClientDocument, "", var1));
                 }
             } else {
-                this.ifV.a(bf.ifM(this.ifV, "", var1));
-                this.ifV.refreshReportDocument();
+                this.reportClientDocument.bindListenersOnChangedEvent(bf.ifM(this.reportClientDocument, "", var1));
+                this.reportClientDocument.refreshReportDocument();
                 if (var1.a() == ak.intV) {
                     PropertyBag var2 = (PropertyBag)var1.doM();
                     String var3 = bf.doM(var2);
-                    this.ifV.getReportDefController().d(var3);
+                    this.reportClientDocument.getReportDefController().d(var3);
                 } else if (var1.a() == ak.elseV) {
                     IGroup var5 = (IGroup)var1.doM();
-                    IGroup var6 = this.ifV.getDataDefController().getDataDefinition().getGroups().getGroup(var5.getGroupIndex());
+                    IGroup var6 = this.reportClientDocument.getDataDefController().getDataDefinition().getGroups().getGroup(var5.getGroupIndex());
                     GroupNameField var4 = new GroupNameField();
                     var4.setGroup(var6);
-                    this.ifV.getReportDefController().d(var4.getFormulaForm());
+                    this.reportClientDocument.getReportDefController().d(var4.getFormulaForm());
                 }
             }
         }
@@ -175,12 +175,12 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     }
 
     public void onChanged(c2 var1) throws ReportSDKException {
-        if (this.ifV != null) {
-            this.ifV.elseM();
-            this.ifV.a(bf.ifM(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.elseM();
+            this.reportClientDocument.bindListenersOnChangedEvent(bf.ifM(this.reportClientDocument, "", var1));
             if (var1.forM() == al.doV) {
-                this.ifV.refreshReportDocument();
-                this.ifV.a(new AdvancedClientDocumentEvent(this.ifV, ClientDocumentChangeType.reportDefinition, (String)null, (String)null, (String)null));
+                this.reportClientDocument.refreshReportDocument();
+                this.reportClientDocument.bindListenersOnChangedEvent(new AdvancedClientDocumentEvent(this.reportClientDocument, ClientDocumentChangeType.reportDefinition, (String)null, (String)null, (String)null));
             }
         }
 
@@ -196,8 +196,8 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     }
 
     public void onChanging(c2 var1) {
-        if (this.ifV != null) {
-            this.ifV.elseM();
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.elseM();
         }
 
     }
@@ -206,9 +206,9 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     }
 
     public void onMoved(c2 var1) {
-        if (this.ifV != null) {
-            this.ifV.elseM();
-            this.ifV.a(bf.a(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.elseM();
+            this.reportClientDocument.bindListenersOnChangedEvent(bf.a(this.reportClientDocument, "", var1));
         }
 
     }
@@ -217,12 +217,12 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     }
 
     public void onDataSourceChanged(cf var1) throws ReportSDKException {
-        if (this.ifV.l()) {
+        if (this.reportClientDocument.l()) {
             if (var1 != null && var1.ifM() instanceof FieldMappingInfos) {
                 return;
             }
 
-            this.ifV.newM(true);
+            this.reportClientDocument.newM(true);
         }
 
     }
@@ -230,17 +230,17 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     public void onDataSourceChanging(cf var1) throws ReportSDKException {
         if (var1 != null) {
             Object var2 = var1.ifM();
-            if (this.ifV != null && var2 instanceof IReportDocument) {
-                this.ifV.a((IReportDocument)var2, true);
+            if (this.reportClientDocument != null && var2 instanceof IReportDocument) {
+                this.reportClientDocument.setName((IReportDocument)var2, true);
             }
 
         }
     }
 
     public void onMoved(c8 var1) {
-        if (this.ifV != null) {
-            this.ifV.i();
-            this.ifV.a(bf.a(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.i();
+            this.reportClientDocument.bindListenersOnChangedEvent(bf.a(this.reportClientDocument, "", var1));
         }
 
     }
@@ -249,53 +249,53 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     }
 
     public void onObjectBoundChanged(c2 var1) {
-        if (this.ifV != null) {
-            this.ifV.elseM();
-            this.ifV.a(bf.ifM(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.elseM();
+            this.reportClientDocument.bindListenersOnChangedEvent(bf.ifM(this.reportClientDocument, "", var1));
         }
 
     }
 
     public void onRemoved(cf var1) {
-        if (this.ifV != null) {
-            this.ifV.v();
-            this.ifV.doM(bf.a(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.v();
+            this.reportClientDocument.bindListensOnSavedEvent(bf.a(this.reportClientDocument, "", var1));
         }
 
     }
 
     public void onRemoved(c8 var1) {
-        if (this.ifV != null) {
-            this.ifV.i();
-            this.ifV.doM(bf.ifM(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.i();
+            this.reportClientDocument.bindListensOnSavedEvent(bf.ifM(this.reportClientDocument, "", var1));
         }
 
     }
 
     public void onRemoved(c2 var1) {
-        if (this.ifV != null) {
+        if (this.reportClientDocument != null) {
             Object var2 = var1.a();
             if (var2 instanceof PropertyBag && ((PropertyBag)var2).containsKey("InsDelGeneric_Object")) {
                 Object var3 = ((PropertyBag)var2).get("InsDelGeneric_Object");
                 if (var3 instanceof ISubreportObject) {
                     String var4 = ((ISubreportObject)var3).getSubreportName();
-                    IStrings var5 = this.ifV.z();
+                    IStrings var5 = this.reportClientDocument.z();
                     if (var5 != null && var5.indexOf(var4) >= 0) {
                         var5.remove(var4);
                     }
                 }
             }
 
-            this.ifV.elseM();
-            this.ifV.doM(bf.ifM(this.ifV, "", var1));
+            this.reportClientDocument.elseM();
+            this.reportClientDocument.bindListensOnSavedEvent(bf.ifM(this.reportClientDocument, "", var1));
         }
 
     }
 
     public void onRemoved(bj var1) {
-        if (this.ifV != null) {
-            this.ifV.t();
-            this.ifV.doM(bf.a(this.ifV, "", var1));
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.t();
+            this.reportClientDocument.bindListensOnSavedEvent(bf.a(this.reportClientDocument, "", var1));
         }
 
     }
@@ -307,8 +307,8 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     }
 
     public void onRemoving(c2 var1) {
-        if (this.ifV != null) {
-            this.ifV.elseM();
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.elseM();
         }
 
     }
@@ -316,12 +316,12 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     public void onRemoving(bj var1) {
     }
 
-    public void ifM(RemoteAgentEvent var1) {
+    public void ifM(RemoteAgentEvent remoteAgentEvent) {
     }
 
-    public void newM(RemoteAgentEvent var1) {
-        if (this.ifV != null) {
-            this.ifV.a(var1);
+    public void newM(RemoteAgentEvent remoteAgentEvent) {
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.setName(remoteAgentEvent);
         }
 
     }
@@ -338,15 +338,15 @@ class b9 implements ICommunicationChannelEventListener, IRemoteAgentEventListene
     public void onTotallerChanged(db var1) {
     }
 
-    public void a(RemoteAgentEvent var1) {
+    public void a(RemoteAgentEvent remoteAgentEvent) {
     }
 
-    public void intM(RemoteAgentEvent var1) {
+    public void intM(RemoteAgentEvent remoteAgentEvent) {
     }
 
     public void onChanged(y var1) {
-        if (this.ifV != null) {
-            this.ifV.B();
+        if (this.reportClientDocument != null) {
+            this.reportClientDocument.B();
         }
 
     }

+ 1 - 1
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/cd.java

@@ -24,7 +24,7 @@ class cd extends cp {
 
     void forM(PropertyBag var1) throws ReportSDKException {
         if (this.ap instanceof ReportClientDocument) {
-            ((ReportClientDocument)this.ap).a(var1);
+            ((ReportClientDocument)this.ap).setName(var1);
         } else if (this.ap instanceof SubreportClientDocument) {
             ((SubreportClientDocument)this.ap).ifM(var1);
         }

+ 1 - 1
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/application/ds.java

@@ -123,7 +123,7 @@ abstract class ds {
         }
 
         this.doV.newM();
-        ResultInfo var5 = this.doV.a(var1, var2, var3, RequestPriority.tryV);
+        ResultInfo var5 = this.doV.a(var1, var2, var3, RequestPriority.NORMAL);
         if (ResultCode.FAILED(var5.getResultCode())) {
             ExceptionHelper.throwResultInfoException(var5, this.a);
         }

+ 222 - 0
crystal-replace-view/src/main/java/com/crystaldecisions/sdk/occa/report/document/SummaryInfo.java

@@ -0,0 +1,222 @@
+package com.crystaldecisions.sdk.occa.report.document;
+
+/**
+ * @author sunyj
+ * @since 2017/12/27 10:16
+ */
+
+import com.crystaldecisions.client.helper.CloneUtil;
+import com.crystaldecisions.client.helper.XMLSerializationHelper;
+import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
+import com.crystaldecisions.sdk.occa.report.lib.*;
+import com.crystaldecisions.xml.serialization.IXMLSerializable;
+import com.crystaldecisions.xml.serialization.XMLConverter;
+import com.crystaldecisions.xml.serialization.XMLSerializationContext;
+import com.crystaldecisions.xml.serialization.XMLWriter;
+import org.xml.sax.Attributes;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Properties;
+
+public class SummaryInfo implements ISummaryInfo, IClone, IXMLSerializable, IControllable {
+    private final ControllableMixin controllableMixin = new ControllableMixin(this);
+    private String title = null;
+    private String subject = null;
+    private String author = null;
+    private String keywords = null;
+    private String comments = null;
+    private boolean isSavingWithPreview = false;
+
+    public SummaryInfo(ISummaryInfo iSummaryInfo) {
+        iSummaryInfo.copyTo(this, true);
+    }
+
+    public SummaryInfo() {
+    }
+
+    public Object clone(boolean var1) {
+        SummaryInfo var2 = new SummaryInfo();
+        this.copyTo(var2, var1);
+        return var2;
+    }
+
+    public void copyTo(Object var1, boolean var2) {
+        if (var1 == null) {
+            throw new NullPointerException();
+        } else if (!(var1 instanceof ISummaryInfo)) {
+            throw new ClassCastException();
+        } else {
+            ISummaryInfo var3 = (ISummaryInfo)var1;
+            var3.setIsSavingWithPreview(this.isSavingWithPreview);
+            var3.setTitle(this.title);
+            var3.setSubject(this.subject);
+            var3.setAuthor(this.author);
+            var3.setKeywords(this.keywords);
+            var3.setComments(this.comments);
+        }
+    }
+
+    public Object createMember(String var1, Attributes var2, XMLSerializationContext var3, Map var4, boolean[] var5) {
+        return null;
+    }
+
+    public void endElement(String var1, Map var2) {
+    }
+
+    public String getAuthor() {
+        return this.author;
+    }
+
+    public String getComments() {
+        return this.comments;
+    }
+
+    public boolean getIsSavingWithPreview() {
+        return this.isSavingWithPreview;
+    }
+
+    public String getKeywords() {
+        return this.keywords;
+    }
+
+    public String getSubject() {
+        return this.subject;
+    }
+
+    public String getTitle() {
+        return this.title;
+    }
+
+    public boolean hasContent(Object var1) {
+        if (var1 == null) {
+            return false;
+        } else if (!(var1 instanceof ISummaryInfo)) {
+            return false;
+        } else {
+            ISummaryInfo var2 = (ISummaryInfo)var1;
+            if (this.isSavingWithPreview != var2.getIsSavingWithPreview()) {
+                return false;
+            } else if (!CloneUtil.equalStringsIgnoreCase(this.title, var2.getTitle())) {
+                return false;
+            } else if (!CloneUtil.equalStringsIgnoreCase(this.subject, var2.getSubject())) {
+                return false;
+            } else if (!CloneUtil.equalStringsIgnoreCase(this.author, var2.getAuthor())) {
+                return false;
+            } else if (!CloneUtil.equalStringsIgnoreCase(this.keywords, var2.getKeywords())) {
+                return false;
+            } else {
+                return CloneUtil.equalStringsIgnoreCase(this.comments, var2.getComments());
+            }
+        }
+    }
+
+    public void readElement(String key, String value, Attributes attributes, Map var4) {
+        if (key.equals("Title")) {
+            this.title = value;
+        } else if (key.equals("Subject")) {
+            this.subject = value;
+        } else if (key.equals("Author")) {
+            this.author = value;
+        } else if (key.equals("Keywords")) {
+            this.keywords = value;
+        } else if (key.equals("Comments")) {
+            this.comments = value;
+        } else if (key.equals("IsSavingWithPreview")) {
+            this.isSavingWithPreview = XMLConverter.getBooleanValue(value);
+        }
+
+    }
+
+    public void save(XMLWriter xmlWriter, XMLSerializationContext xmlSerializationContext) throws IOException {
+        String var3 = XMLConverter.getXMLFromClassName(this.getClass().getName());
+        Properties var4 = XMLSerializationHelper.getHeaderAttributes(var3);
+        xmlWriter.writeStartElement("CrystalReports.SummaryInfo", var4);
+        this.saveContents(xmlWriter, xmlSerializationContext);
+        xmlWriter.writeEndElement("CrystalReports.SummaryInfo");
+    }
+
+    public void save(XMLWriter xmlWriter, String var2, XMLSerializationContext xmlSerializationContext) throws IOException {
+        xmlWriter.writeStartObjectElement(var2, "2", this, xmlSerializationContext);
+        this.saveContents(xmlWriter, xmlSerializationContext);
+        xmlWriter.writeEndElement(var2);
+    }
+
+    public void saveContents(XMLWriter xmlWriter, XMLSerializationContext xmlSerializationContext) throws IOException {
+        xmlWriter.writeTextElement("Title", this.title, (Properties)null);
+        xmlWriter.writeTextElement("Subject", this.subject, (Properties)null);
+        xmlWriter.writeTextElement("Author", this.author, (Properties)null);
+        xmlWriter.writeTextElement("Keywords", this.keywords, (Properties)null);
+        xmlWriter.writeTextElement("Comments", this.comments, (Properties)null);
+        xmlWriter.writeBooleanElement("IsSavingWithPreview", this.isSavingWithPreview, (Properties)null);
+    }
+
+    public void setAuthor(final String author) {
+        this.controllableMixin.makeChange(new IChange() {
+            public void run() {
+                SummaryInfo.this.author = author;
+            }
+        });
+    }
+
+    public void setComments(final String comments) {
+        this.controllableMixin.makeChange(new IChange() {
+            public void run() {
+                SummaryInfo.this.comments = comments;
+            }
+        });
+    }
+
+    public void setIsSavingWithPreview(final boolean isSavingWithPreview) {
+        this.controllableMixin.makeChange(new IChange() {
+            public void run() {
+                SummaryInfo.this.isSavingWithPreview = isSavingWithPreview;
+            }
+        });
+    }
+
+    public void setKeywords(final String keywords) {
+        this.controllableMixin.makeChange(new IChange() {
+            public void run() {
+                SummaryInfo.this.keywords = keywords;
+            }
+        });
+    }
+
+    public void setSubject(final String subject) {
+        this.controllableMixin.makeChange(new IChange() {
+            public void run() {
+            }
+        });
+    }
+
+    public void setTitle(final String title) {
+        this.controllableMixin.makeChange(new IChange() {
+            public void run() {
+                SummaryInfo.this.title = title;
+            }
+        });
+    }
+
+    public void startElement(String var1, Map var2, Attributes attributes) {
+    }
+
+    public ControllableMixin getControllableMixin() {
+        return this.controllableMixin;
+    }
+
+    public void doControllerModification(Object var1) throws ReportSDKException {
+        assert this.isDirectlyControllable();
+
+        ISummaryInfo var2 = (ISummaryInfo)var1;
+        IEROMControllerInterface var3 = (IEROMControllerInterface)this.controllableMixin.getControllerInterface();
+        ((ReportClientDocument)var3.getReportDocumentController()).modifySummaryInfo(var2);
+    }
+
+    public boolean isDirectlyControllable() {
+        return true;
+    }
+
+    public void enumerateMembers(IMemberVisitor var1) {
+    }
+}

Some files were not shown because too many files changed in this diff