ossiejhmoore icon

Fetch

ossiejhmoore | PRO | 09/25/12 07:58:16 PM UTC | 0 ⭐ | 506 👁️ | Never ⏰ | []
Java |

1.04 KB

|

None

|

0 👍

/

0 👎

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package getdocumentstatsforstructure;
 
import com.opentext.api.LAPI_DOCUMENTS;
import com.opentext.api.LLSession;
import com.opentext.api.LLValue;
 
/**
 *
 * @author mooreo
 */
public class TestFetchVersion {
    private static LLSession session = new LLSession("hostname", 2099, null, "username", "passowrd");
    public static void main(String [] args) throws Throwable {
        
        
        LAPI_DOCUMENTS apiDoc = new LAPI_DOCUMENTS(session);
        int dataid = 6840021;
        
        LLValue objInfo = (new LLValue()).setAssocNotSet();
        check(apiDoc.GetObjectInfo(0, dataid, objInfo));
        
        check(apiDoc.FetchVersion(objInfo.toInteger("VOLUMEID"), objInfo.toInteger("ID"), objInfo.toInteger("VERSIONNUM"), "c:\\temp\\blah.dat"));
        
    }
    
    private static void check(int i) {
        if (i != 0) {
            throw new RuntimeException(session.getStatusMessage());
        }
    }
}

Comments