src/de/uka/ipd/idaho/goldenGateServer/ims/client/GoldenGateImsClient.java
/**
	 * Release a document so other users can work on it again. This is possible
	 * only under two conditions: (1) the document was checked out by the user
	 * this client is authenticated with, which is the normal use, or (2) with
	 * administrative privileges, which should be done only in rare cases
	 * because it possibly annihilates all the work the checkout user has done
	 * on the document.
	 * @param documentId the ID of the document to release
	 * @throws IOException
	 */
Release a document so other users can work on it again. This is possible
only under two conditions: (1) the document was checked out by the user
this client is authenticated with, which is the normal use, or (2) with
administrative privileges, which should be done only in rare cases
because it possibly annihilates all the work the checkout user has done
on the document.
@param documentId the ID of the document to release
@throws IOException
Release a document so other users can work on it again . This is possible only under two conditions : ( 1 ) the document was checked out by the user this client is authenticated with which is the normal use or ( 2 ) with administrative privileges which should be done only in rare cases because it possibly annihilates all the work the checkout user has done on the document . @param documentId the ID of the document to release @throws IOException
public void releaseDocument(String documentId) throws IOException {
		if (!this.authClient.isLoggedIn()) throw new IOException("Not logged in.");
		Connection con = null;
		try {
			con = this.authClient.getConnection();
			BufferedWriter bw = con.getWriter();
			bw.write(RELEASE_DOCUMENT);
			bw.newLine();
			bw.write(this.authClient.getSessionID());
			bw.newLine();
			bw.write(documentId);
			bw.newLine();
			bw.flush();
			BufferedReader br = con.getReader();
			String error = br.readLine();
			if (!RELEASE_DOCUMENT.equals(error))
				throw new IOException("Document release failed: " + error);
		}
		finally {
			if (con != null)
				con.close();
		}
	}
public void releaseDocument ( String documentId ) throws IOException { if ( ! this . authClient . isLoggedIn ( ) ) throw new IOException ( "Not logged in." ) ; Connection con = null ; try { con = this . authClient . getConnection ( ) ; BufferedWriter bw = con . getWriter ( ) ; bw . write ( RELEASE_DOCUMENT ) ; bw . newLine ( ) ; bw . write ( this . authClient . getSessionID ( ) ) ; bw . newLine ( ) ; bw . write ( documentId ) ; bw . newLine ( ) ; bw . flush ( ) ; BufferedReader br = con . getReader ( ) ; String error = br . readLine ( ) ; if ( ! RELEASE_DOCUMENT . equals ( error ) ) throw new IOException ( "Document release failed: " + error ) ; } finally { if ( con != null ) con . close ( ) ; } }
Release a document so other users can work on it again.
Release a document so other users can work on it again .