Wizard Samples
Basics
Section titled “Basics”Suggested code sample
Section titled “Suggested code sample”First, you must create the webservice object:
OKMWebservices ws = OKMWebservicesFactory.getInstance(host);Then should login using the method “login”. You can access the “login” method from webservice object “ws” as is shown below:
ws.login(user, password);At this point you can use all the Wizard methods from “wizard” class as is shown below:
ws.wizard.findByUser();Methods
Section titled “Methods”findByUser
Section titled “findByUser”Description:
| Method | Return values | Description |
|---|---|---|
| findByUser() | List |
Returns a list of nodes with a wizard. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.bean.WizardNode;import com.openkm.sdk4j.impl.OKMWebservices;
import java.util.List;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); List<WizardNode> list = ws.wizard.findByUser(); for (WizardNode wizardNode : list) { System.out.println(wizardNode); } } catch (Exception e) { e.printStackTrace(); } }}findByUserAndUuid
Section titled “findByUserAndUuid”Description:
| Method | Return values | Description |
|---|---|---|
| findByUserAndUuid(String uuid) | WizardNode | Get the wizard of a node |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.bean.WizardNode;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); WizardNode wizardNode = ws.wizard.findByUserAndUuid("11225723-883f-4c12-8816-650b2c82c89b"); System.out.println(wizardNode); } catch (Exception e) { e.printStackTrace(); } }}hasWizardByUserAndNode
Section titled “hasWizardByUserAndNode”Description:
| Method | Return values | Description |
|---|---|---|
| hasWizardByUserAndNode() | boolean | Know if a node has a wizard |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); System.out.println("The node has a wizard: " + ws.wizard.hasWizardByUserAndNode("11225723-883f-4c12-8816-650b2c82c89b")); } catch (Exception e) { e.printStackTrace(); } }}deleteAll
Section titled “deleteAll”Description:
| Method | Return values | Description |
|---|---|---|
| deleteAll() | void | Remove all wizards of the user. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.deleteAll(); System.out.println("Delete all"); } catch (Exception e) { e.printStackTrace(); } }}addDigitalSignature
Section titled “addDigitalSignature”Description:
| Method | Return values | Description |
|---|---|---|
| addDigitalSignature() | void | Add digital signature in the wizard of a node. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.addDigitalSignature("055b5206-35d0-4351-ba92-c304bbba7ddf"); System.out.println("addDigitalSignature"); } catch (Exception e) { e.printStackTrace(); } }}removeDigitalSignature
Section titled “removeDigitalSignature”Description:
| Method | Return values | Description |
|---|---|---|
| removeDigitalSignature | void | Remove digital signature in the wizard of a node. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.removeDigitalSignature("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae"); System.out.println("removeDigitalSignature"); } catch (Exception e) { e.printStackTrace(); } }}addShowWizardCategories
Section titled “addShowWizardCategories”Description:
| Method | Return values | Description |
|---|---|---|
| addShowWizardCategories | void | Add show wizard categories in the wizard of a node. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.removeDigitalSignature("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae"); System.out.println("removeDigitalSignature"); } catch (Exception e) { e.printStackTrace(); } }}removeShowWizardCategories
Section titled “removeShowWizardCategories”Description:
| Method | Return values | Description |
|---|---|---|
| removeShowWizardCategories | void | Remove show wizard categories in the wizard of a node. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.removeShowWizardCategories("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae"); System.out.println("removeShowWizardCategories"); } catch (Exception e) { e.printStackTrace(); } }}addShowWizardKeywords
Section titled “addShowWizardKeywords”Description:
| Method | Return values | Description |
|---|---|---|
| addShowWizardKeywords | void | Add show wizard keywords in the wizard of a node. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.addShowWizardKeywords("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae"); System.out.println("addShowWizardKeywords"); } catch (Exception e) { e.printStackTrace(); } }}removeShowWizardKeywords
Section titled “removeShowWizardKeywords”Description:
| Method | Return values | Description |
|---|---|---|
| removeShowWizardKeywords | void | Remove show wizard keywords in the wizard of a node. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.removeShowWizardKeywords("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae"); System.out.println("removeShowWizardKeywords"); } catch (Exception e) { e.printStackTrace(); } }}addShowWizardOCRDataCapture
Section titled “addShowWizardOCRDataCapture”Description:
| Method | Return values | Description |
|---|---|---|
| addShowWizardOCRDataCapture | void | Add show wizard OCR data capture in the wizard of a node. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.addShowWizardOCRDataCapture("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae"); System.out.println("addShowWizardOCRDataCapture"); } catch (Exception e) { e.printStackTrace(); } }}removeShowWizardOCRDataCapture
Section titled “removeShowWizardOCRDataCapture”Description:
| Method | Return values | Description |
|---|---|---|
| removeShowWizardOCRDataCapture | void | Remove show wizard OCR data capture in the wizard of a node. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.removeShowWizardOCRDataCapture("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae"); System.out.println("removeShowWizardOCRDataCapture"); } catch (Exception e) { e.printStackTrace(); } }}addGroup
Section titled “addGroup”Description:
| Method | Return values | Description |
|---|---|---|
| addGroup(String uuid, String group) | void | Add metadata group in the wizard. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.addGroup("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae", "okg:tpl"); System.out.println("addGroup"); } catch (Exception e) { e.printStackTrace(); } }}removeGroup
Section titled “removeGroup”Description:
| Method | Return values | Description |
|---|---|---|
| removeGroup(String uuid, String group) | void | Remove metadata group in the wizard. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.removeGroup("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae", "okg:tpl"); System.out.println("removeGroup"); } catch (Exception e) { e.printStackTrace(); } }}addWorkflow
Section titled “addWorkflow”Description:
| Method | Return values | Description |
|---|---|---|
| addWorkflow(String uuid, String workflow) | void | Add a workflow in the wizard. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.addWorkflow("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae", "purchase"); System.out.println("addGroup"); } catch (Exception e) { e.printStackTrace(); } }}removeWorkflow
Section titled “removeWorkflow”Description:
| Method | Return values | Description |
|---|---|---|
| removeWorkflow(String uuid, String workflow) | void | Remove a workflow in the wizard. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.removeWorkflow("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae", "purchase"); System.out.println("addGroup"); } catch (Exception e) { e.printStackTrace(); } }}setAutostart
Section titled “setAutostart”Description:
| Method | Return values | Description |
|---|---|---|
| setAutostart | void | Set auto start to the wizard. |
Example:
package com.openkm;
import com.openkm.sdk4j.OKMWebservicesFactory;import com.openkm.sdk4j.impl.OKMWebservices;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/openkm"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.getInstance(host);
try { ws.login(user, password); ws.wizard.setAutostart("02add6bf-e5ac-4f4a-8f3f-922958f5b6ae"); System.out.println("setAutostart"); } catch (Exception e) { e.printStackTrace(); } }}