Java Doc for WsConnection.java in  » Groupware » LibreSource » org » libresource » so6 » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Groupware » LibreSource » org.libresource.so6.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.libresource.so6.core.WsConnection

WsConnection
public class WsConnection implements java.io.Serializable(Code)
The WsConnection class represents a connection to a So6 Queue. This class is used to manage the synchronisation process.
author:
   Smack
version:
   1.0, 26/05/04
See Also:   org.libresource.so6.core.Workspace
See Also:   org.libresource.so6.core.client.ClientI
since:
   JDK1.4


Field Summary
final public static  intCOMMIT_CORRUPTION_PATCH_REF_COPY
    
final public static  intCOMMIT_CORRUPTION_SAVE_PATCH
    
final public static  intCOMMIT_CORRUPTION_UPDATE_LOCAL_DBTYPE
    
final public static  intCOMMIT_CORRUPTION_UPDATE_RECEIVED_TICKET
    
final public static  StringCORRUPTION_STATE
    
final public static  StringDATAPATH
    
final public static  StringLAST_BIN_EXT
    
final public static  StringLAST_TICKET_BEFORE_CORRUPTION
    
final public static  intNO_CORRUPTION
    
final public static  StringPATH
    
final public static  StringSO6_LAST_COMMIT_PATCH_FILE
    
final public static  StringSO6_WSC_FILE
    
final public static  StringSYNC_CLIENT_NAME
    
final public static  intUPDATE_CORRUPTION_PATCH_LOCAL_COPY
    
final public static  intUPDATE_CORRUPTION_PATCH_REF_COPY
    
final public static  intUPDATE_CORRUPTION_REMOVE_PATCH
    
final public static  intUPDATE_CORRUPTION_SAVE_PATCH
    
final public static  StringWS_NAME
    
final public static  StringXML_AUTO_DETECTION
    

Constructor Summary
public  WsConnection(String wscPath)
     Load an EXISTING WsConnection object in order to access to the synchronisation process.

Method Summary
public  voidcleanLocalOp()
    
public  voidcommit(String comment)
     Commit the local changes with the specified comment.
public  voidcompressLocalHistory(long from, long to)
    
public  longcomputeNbCommandToSend(OpVector localOp)
     Return the number of commands that are kept with the current filter in the localOpVector.
Parameters:
  localOp - The command vector.
public  PatchRepositorygetAppliedPatch()
    
public  StringgetAttachFilePath()
     Return the base path where the attachement of the local command are temporary stored.
public  ClientIgetClient()
     Automaticaly instantiate the class specified for property SYNC_CLIENT_NAME with the default constructor that take the SO6_WSC_FILE property file as parameter.
public  intgetCorruptedState()
    
public  DBTypegetDBType()
    
public  StringgetDBTypePath()
    
public  StringgetDataPath()
     The data path is the place where the WsConnection store all the important data to manage the synchronisation process.
public  StringgetLastBinExt()
    
public  StringgetLocalCmdPath()
     Return the base path where the local command are temporary stored when they are computed from the diff beetwen the refcopy and the local copy.
public  StringgetMergedAttachPath()
     The current path of the attachement of the merged commands.
public  StringgetMergedOpBasePath()
     Return the base path where the merged commands are stored.
public  StringgetMergedOpPath()
     Return the current path of the merged commands.
public  longgetNs()
     Return the current connection ticket.
public  StringgetPath()
    
public  StringgetProperty(String propName)
     Return the property value for the key passed in parameter.
public  PatchRepositorygetReceivedPatch()
    
public  RefCopygetRefCopy()
    
public  StringgetRefCopyPath()
     Return the base path where the local reference copy is stored.
public  StringgetReport()
     Return the current report as a String for simple output.
public  StringgetTempDir()
    
public  WorkspacegetWorkspace()
    
public  StringgetWsName()
    
public  booleangetXmlAutoDetection()
    
public  booleanisCorrupted()
    
public  voidload(String path)
     Load meta data from the filesystem.
public  voidmerge(Command cmd, OpVector local)
    
public  voidreceive()
     Download the remote patch without applying them localy.
public  voidremovedOldMergedOp()
    
public  voidrestore()
    
public  voidsave()
    
public  StringsendCurrentCompressState()
    
public  voidsetClient(ClientI clientI)
     Set the ClientI for that connection and update the binary extention.
public  voidsetFilter(Vector filter)
     Set a commit filter.

To allow a commit of limited set of files.

public  voidsetProperty(String key, String value)
    
public  voidsetSimulationMode(boolean simulation, String outputDir)
     This methode is used to simulate actions.
public  voidsetXmlAutoDetection(boolean autoDetect)
    
public  voidupdate()
     Update the local workspace in order to integrate the concurrent change.
public  voidupdateAndCommit(String comment)
     Automaticaly update and commit on the current connection.
public  voidupdateAndCommit()
     Automaticaly update and commit on the current connection.
public  voidupdateBinExt()
     Reload the binary extention definition from the ClientI interface.
public  voidupdateProp(Properties prop)
    

Field Detail
COMMIT_CORRUPTION_PATCH_REF_COPY
final public static int COMMIT_CORRUPTION_PATCH_REF_COPY(Code)
Constant for the corruption property : WsConnection corrupted while patching the local reference copy after a commit



COMMIT_CORRUPTION_SAVE_PATCH
final public static int COMMIT_CORRUPTION_SAVE_PATCH(Code)
Constant for the corruption property : WsConnection corrupted while saving patch in the applied patch directory after a commit



COMMIT_CORRUPTION_UPDATE_LOCAL_DBTYPE
final public static int COMMIT_CORRUPTION_UPDATE_LOCAL_DBTYPE(Code)
Constant for the corruption property: WsConnection corrupted while trying to replace the local dbType by the ref dbType



COMMIT_CORRUPTION_UPDATE_RECEIVED_TICKET
final public static int COMMIT_CORRUPTION_UPDATE_RECEIVED_TICKET(Code)
Constant for the corruption property : WsConnection corrupted while updating the received ticket



CORRUPTION_STATE
final public static String CORRUPTION_STATE(Code)
Property used in the SO6_WSC_FILE property file to represente the current corrupted state



DATAPATH
final public static String DATAPATH(Code)
Property used in the SO6_WSC_FILE property file to represente the data path of that connection



LAST_BIN_EXT
final public static String LAST_BIN_EXT(Code)
Property used in the SO6_WSC_FILE property file to represente the list of the binary extension



LAST_TICKET_BEFORE_CORRUPTION
final public static String LAST_TICKET_BEFORE_CORRUPTION(Code)
Property used in the SO6_WSC_FILE property file to represente the last integrated ticket before any corruption



NO_CORRUPTION
final public static int NO_CORRUPTION(Code)
Constant for the corruption property : WsConnection not corrupted



PATH
final public static String PATH(Code)
Property used in the SO6_WSC_FILE property file to represente the worskpace base path



SO6_LAST_COMMIT_PATCH_FILE
final public static String SO6_LAST_COMMIT_PATCH_FILE(Code)
Name of last patch file sent during the commit



SO6_WSC_FILE
final public static String SO6_WSC_FILE(Code)
Name of the file where the WsConnection meta data will be stored



SYNC_CLIENT_NAME
final public static String SYNC_CLIENT_NAME(Code)
Property used in the SO6_WSC_FILE property file to represente the name of the concrete class of the ClientI interface that need to be used for that connection



UPDATE_CORRUPTION_PATCH_LOCAL_COPY
final public static int UPDATE_CORRUPTION_PATCH_LOCAL_COPY(Code)
Constant for the corruption property : WsConnection corrupted while patching local copy



UPDATE_CORRUPTION_PATCH_REF_COPY
final public static int UPDATE_CORRUPTION_PATCH_REF_COPY(Code)
Constant for the corruption property : WsConnection corrupted while patching the local reference copy after an update



UPDATE_CORRUPTION_REMOVE_PATCH
final public static int UPDATE_CORRUPTION_REMOVE_PATCH(Code)
Constant for the corruption property : WsConnection corrupted while removing the applied patch in the received directory after an update



UPDATE_CORRUPTION_SAVE_PATCH
final public static int UPDATE_CORRUPTION_SAVE_PATCH(Code)
Constant for the corruption property : WsConnection corrupted while saving patch in the applied patch directory after an update



WS_NAME
final public static String WS_NAME(Code)
Property used in the SO6_WSC_FILE property file to represente the name of that connection in order to know who did what?



XML_AUTO_DETECTION
final public static String XML_AUTO_DETECTION(Code)
Property used in the SO6_WSC_FILE propertie file is use to set the XML merge (true/false)




Constructor Detail
WsConnection
public WsConnection(String wscPath) throws IOException(Code)
Load an EXISTING WsConnection object in order to access to the synchronisation process.
Parameters:
  wscPath - SO6_WSC_FILE file path




Method Detail
cleanLocalOp
public void cleanLocalOp() throws Exception(Code)
Remove the local computed command
throws:
  Exception -



commit
public void commit(String comment) throws Exception(Code)
Commit the local changes with the specified comment.
Parameters:
  comment - The comment for that commit
throws:
  Exception -



compressLocalHistory
public void compressLocalHistory(long from, long to) throws Exception(Code)



computeNbCommandToSend
public long computeNbCommandToSend(OpVector localOp) throws Exception(Code)
Return the number of commands that are kept with the current filter in the localOpVector.
Parameters:
  localOp - The command vector. The number of operation kept with that filter
throws:
  Exception - On dependency error or if no filter set.



getAppliedPatch
public PatchRepository getAppliedPatch()(Code)
Return the applied patch repository The applied patch repository



getAttachFilePath
public String getAttachFilePath()(Code)
Return the base path where the attachement of the local command are temporary stored. path of the directory



getClient
public ClientI getClient() throws Exception(Code)
Automaticaly instantiate the class specified for property SYNC_CLIENT_NAME with the default constructor that take the SO6_WSC_FILE property file as parameter. The ClientI of that connection



getCorruptedState
public int getCorruptedState()(Code)
Return the corrupted state The corrupted state



getDBType
public DBType getDBType()(Code)
Return the local DBType The local DBType



getDBTypePath
public String getDBTypePath()(Code)
Return the base path where the DbType are stored (local.dbtype / refcopy.dbtype) path of the directory



getDataPath
public String getDataPath()(Code)
The data path is the place where the WsConnection store all the important data to manage the synchronisation process. The base path of the WsConnection data path



getLastBinExt
public String getLastBinExt()(Code)
Return the last set of binary extention The last set of binary extention



getLocalCmdPath
public String getLocalCmdPath()(Code)
Return the base path where the local command are temporary stored when they are computed from the diff beetwen the refcopy and the local copy. path of the directory



getMergedAttachPath
public String getMergedAttachPath()(Code)
The current path of the attachement of the merged commands. path of the directory



getMergedOpBasePath
public String getMergedOpBasePath()(Code)
Return the base path where the merged commands are stored. path of the directory



getMergedOpPath
public String getMergedOpPath()(Code)
Return the current path of the merged commands. path of the directory



getNs
public long getNs()(Code)
Return the current connection ticket. The ticket is equivalent to a timestamp in the shared data history. The current connection ticket.



getPath
public String getPath()(Code)
Return the base path of the workspace The base path of the workspace



getProperty
public String getProperty(String propName)(Code)
Return the property value for the key passed in parameter.
Parameters:
  propName - key name The property value for the key passed in parameter.



getReceivedPatch
public PatchRepository getReceivedPatch()(Code)
Return the received patch repository The received patch repository



getRefCopy
public RefCopy getRefCopy()(Code)
Return the refCopy object that represent the reference copy of the local workspace The refCopy object



getRefCopyPath
public String getRefCopyPath()(Code)
Return the base path where the local reference copy is stored. path of the directory



getReport
public String getReport()(Code)
Return the current report as a String for simple output. (a CVS like report) The current report as a String for simple output. (a CVS likereport)



getTempDir
public String getTempDir()(Code)
The temp working directory path of the directory



getWorkspace
public Workspace getWorkspace() throws Exception(Code)
Return the workspace connection The workspace of that connection



getWsName
public String getWsName()(Code)
Return the name of that connection The name of that connection



getXmlAutoDetection
public boolean getXmlAutoDetection()(Code)
Return if the connection merge XML data if the connection merge XML data



isCorrupted
public boolean isCorrupted()(Code)
Return true if the connection is corrupted True if the connection is corrupted



load
public void load(String path) throws IOException(Code)
Load meta data from the filesystem. (Need to be used when concurrent update on the file systeme.)
Parameters:
  path - The path of the workspace connection property file
throws:
  Exception -



merge
public void merge(Command cmd, OpVector local) throws Exception(Code)
Methode called by the MergePatchHandler
Parameters:
  cmd -
Parameters:
  local -
throws:
  Exception -



receive
public void receive() throws Exception(Code)
Download the remote patch without applying them localy.
throws:
  Exception -



removedOldMergedOp
public void removedOldMergedOp() throws Exception(Code)
Remove old merged op



restore
public void restore() throws Exception(Code)
Restore the local corrupted connection

If the connection is not corrupted, throw an Excpetion
throws:
  Exception -




save
public void save()(Code)
Save the data in the property file



sendCurrentCompressState
public String sendCurrentCompressState() throws Exception(Code)



setClient
public void setClient(ClientI clientI) throws Exception(Code)
Set the ClientI for that connection and update the binary extention. This methode won't update the property file. This is just for the current run time.
Parameters:
  clientI -



setFilter
public void setFilter(Vector filter)(Code)
Set a commit filter.

To allow a commit of limited set of files. The vector filter must contain all the relative file path that you want to commit.
Parameters:
  filter -




setProperty
public void setProperty(String key, String value)(Code)
Set a property in the SO6_WSC_FILE property file
Parameters:
  key - The key of the property
Parameters:
  value - The value associated to that key



setSimulationMode
public void setSimulationMode(boolean simulation, String outputDir)(Code)
This methode is used to simulate actions. It means that the local data won't be modified, but a report will be made in the specified directory in order to explain what would happen if it wasn't a simulation.
Parameters:
  simulation - To set or unset the simulation mode
Parameters:
  outputDir - The output directory where will be stored the report.



setXmlAutoDetection
public void setXmlAutoDetection(boolean autoDetect)(Code)
Enable or disable the Xml auto detection
Parameters:
  autoDetect - true if you want to activate the Xml dectection.



update
public void update() throws Exception(Code)
Update the local workspace in order to integrate the concurrent change.
throws:
  Exception -



updateAndCommit
public void updateAndCommit(String comment) throws Exception(Code)
Automaticaly update and commit on the current connection.
Parameters:
  comment - The comment of the commit.
throws:
  Exception -



updateAndCommit
public void updateAndCommit() throws Exception(Code)
Automaticaly update and commit on the current connection. Without any comment.
throws:
  Exception -



updateBinExt
public void updateBinExt() throws Exception(Code)
Reload the binary extention definition from the ClientI interface.



updateProp
public void updateProp(Properties prop)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.