OKMTask

Basics

Task fields description:

FieldTypeDescriptionMandatory

Id

Long

Internal task id.

It is automatically set by application.

 Not applicable.

Owner

String

It contains the OpenKM userId.

It is automatically set by application.

Not applicable.

Subject

String

The topic of the task.

Yes.

Description

String

The description of the task.

No.

Start

Calendar

When the task might start.

Yes.

End

Calendar

When the task might endding.

No.

Status

TaskStatus

The task status.

You administering the list of status values.

Yes.

Project

TaskProject

The project related with the task.

You administering the list of project values.

Yes.

Type

TaskType

The task type.

You administering the list of task type values.

 Yes.

Progress

Integer

The numeric progress status.

The range of allowed values are from 0 to 100. Where 100% indicates a completed task.

 Yes.

RepeatGroup

Long

When task is repeated along time is a member of a group. The group is identifyied by an unique repeat group id.

No.

ReminderStartValue

Integer

How many days before the task starting, the system might send a mail notification to the user.

No.

ReminderEndValue

Integer

How many days before the task ending, the system might send a mail notification to the user.

No.

ReminderStartUnit

String

Reminder start units.

Allowed values:

  • "m" for minutes.
  • "h" for hours.
  • "d" for days.

Mandatory when ReminderStartValue greater than 0.

ReminderEndUnit

String

Reminder end units.

Allowed values:

  • "m" for minutes.
  • "h" for hours.
  • "d" for days.

Mandatory when ReminderEndValue greater than 0.

Users

Set<String>

Collection of assigned users to the task.

No. But At least should be a user or role assigned.

Roles

Set<String>

Collection of assigned roles to the task.

No. But At least should be a user or role assigned.

Documents

Set<String>

Lisf of UUID's of the related documents.

No.

Folders

Set<String>

Lisf of UUID's of the related folders.

No.

Mails

Set<String>

Lisf of UUID's of the related mails.

No.

Recors

Set<String>

 Lisf of UUID's of the related records.

No.

On all methods you'll see parameter named "token". When accessing application across SOAP the login process returns a token, what is used to identify the user on all the exposed methods. From default application execution context you must use "null" value what indicates to the application must use the "user session".

On special cases you might be "promoted as Administrator" using the "administrator token".

String systemToken = DbSessionManager.getInstance().getSystemToken();

Methods

create

Description:

MethodReturn valuesDescription

create(String token, Task task)

Task

Create a new task.

Example:

package com.openkm;

import java.util.Calendar;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;
import com.openkm.bean.TaskProject;
import com.openkm.bean.TaskStatus;
import com.openkm.bean.TaskType;

public class Test {
    public static void main(String[] args) {
        try {
            Task task = new Task();
            task.setSubject("task subject");
            task.setDescription("description");
            Calendar start = Calendar.getInstance();
            start.add(Calendar.DATE, 15);
            task.setStart(start);
            long taskStatusId = 1; // A valid task status id
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            TaskStatus status = OKMTask.getInstance().findStatus(null, taskStatusId);
            TaskProject project = OKMTask.getInstance().findProject(null, projectId);
            TaskType type = OKMTask.getInstance().findType(null, typeId);
            task.setStatus(status);
            task.setProject(project);
            task.setType(type);
            task.setProgress(0);
            OKMTask.getInstance().create(null, task);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

update

Description:

MethodReturn valuesDescription

update(String token, Task task)

Task

Update a task.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long taskId = 15; // A valid task id
            Task task = OKMTask.getInstance().find(null, taskId);
            task.setSubject("subject modified");
            OKMTask.getInstance().update(null, task);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

delete

Description:

MethodReturn valuesDescription

delete(String token, Task task)

void

Delete a task.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long taskId = 15; // A valid task id
            OKMTask.getInstance().delete(null, taskId);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

find

Description:

MethodReturn valuesDescription

find(String token, Task task)

Task

Find a task.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long taskId = 15; // A valid task id
            Task task = OKMTask.getInstance().find(null, taskId);
            System.out.println(task);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getByProject

Description:

MethodReturn valuesDescription

getByProject(String token, long projectId)

List<Task>

Retrieve a list of task related with a project.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            for (Task task : OKMTask.getInstance().getByProject(null, projectId)) {
                System.out.println(task);
            }
            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getByType

Description:

MethodReturn valuesDescription

getByType(String token, long typeId)

List<Task>

Retrieve a list of task related with a task type.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long typeId = 1; // A valid type id
            for (Task task : OKMTask.getInstance().getByType(null, typeId)) {
                System.out.println(task);
            }
            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getAssigned

Description:

MethodReturn valuesDescription

getAssigned(String token, long projectId, long typeId, long statusId, String order)

List<Task>

Retrieve a list of tasks assigned to a user and filtered.

Filter parameters description:

  • The projectId parameter must be a valid project id.
  • The typeId parameters must be a valid type id.
  • The statusId parameters must be a valid status id.
  • The order parameter must be a valid parameters of the TaskManagerTask class. Common used parameters are "subject", "start", "end", "progress", "owner".  More information at javadoc documentation.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            long statusId = 1; // A valid status id
            String order = "start"; // A valid TaskManagerTask class parameter name used in HQL query
            for (Task task : OKMTask.getInstance().getAssigned(null, projectId, typeId, statusId, order)) {
                System.out.println(task);
            }
            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getAssigned

Description:

MethodReturn valuesDescription

getAssigned(String token, long projectId, long typeId, long statusId, String order, int offset, int limit)

List<Task>

Retrieve a list of tasks assigned to a user, filtered and paginated.

Filter parameters description:

  • The projectId parameter must be a valid project id.
  • The typeId parameters must be a valid type id.
  • The statusId parameters must be a valid status id.
  • The order parameter must be a valid parameters of the TaskManagerTask class. Common used parameters are "subject", "start", "end", "progress", "owner".  More information at javadoc documentation.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            long statusId = 1; // A valid status id
            String order = "start"; // A valid TaskManagerTask class parameter name used in HQL query
            for (Task task : OKMTask.getInstance().getAssigned(null, projectId, typeId, statusId, order, 0, 10)) {
                System.out.println(task);
            }
            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

countAssigned

Description:

MethodReturn valuesDescription

countAssigned(String token, long projectId, long typeId, long statusId)

Long

Return the number of tasks assigned to a user.

Filter parameters description:

  • The projectId parameter must be a valid project id.
  • The typeId parameters must be a valid type id.
  • The statusId parameters must be a valid status id.

Example:

package com.openkm;

import com.openkm.api.OKMTask;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            long statusId = 1; // A valid status id
            long total = OKMTask.getInstance().countAssigned(null, projectId, typeId, statusId);
            System.out.println(total);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getActive

Description:

MethodReturn valuesDescription

getActive(String token, long projectId, long typeId, long statusId, String order)

List<Task>

Retrieve a list of active tasks assigned to a user and filtered.

Filter parameters description:

  • The projectId parameter must be a valid project id.
  • The typeId parameters must be a valid type id.
  • The statusId parameters must be a valid status id.
  • The order parameter must be a valid parameters of the TaskManagerTask class. Common used parameters are "subject", "start", "end", "progress", "owner".  More information at javadoc documentation.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            long statusId = 1; // A valid status id
            String order = "start"; // A valid TaskManagerTask class parameter name used in HQL query
            for (Task task : OKMTask.getInstance().getActive(null, projectId, typeId, statusId, order)) {
                System.out.println(task);
            }
            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getActive

Description:

MethodReturn valuesDescription

getActive(String token, long projectId, long typeId, long statusId, String order, int offset, int limit)

List<Task>

Retrieve a list of active tasks assigned to a user, filtered and paginated.

Filter parameters description:

  • The projectId parameter must be a valid project id.
  • The typeId parameters must be a valid type id.
  • The statusId parameters must be a valid status id.
  • The order parameter must be a valid parameters of the TaskManagerTask class. Common used parameters are "subject", "start", "end", "progress", "owner".  More information at javadoc documentation.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            long statusId = 1; // A valid status id
            String order = "start"; // A valid TaskManagerTask class parameter name used in HQL query
            for (Task task : OKMTask.getInstance().getActive(null, projectId, typeId, statusId, order, 0, 10)) {
                System.out.println(task);
            }
            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

countActive

Description:

MethodReturn valuesDescription

countActive(String token, long projectId, long typeId, long statusId)

Long

Return the number of active tasks to a user.

Filter parameters description:

  • The projectId parameter must be a valid project id.
  • The typeId parameters must be a valid type id.
  • The statusId parameters must be a valid status id.

Example:

package com.openkm;

import com.openkm.api.OKMTask;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            long statusId = 1; // A valid status id
            long total = OKMTask.getInstance().countAssigned(null, projectId, typeId, statusId);
            System.out.println(total);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getFinished

Description:

MethodReturn valuesDescription

getFinished(String token, long projectId, long typeId, long statusId, String order)

List<Task>

Retrieve a list of finished tasks assigned to a user and filtered.

Filter parameters description:

  • The projectId parameter must be a valid project id.
  • The typeId parameters must be a valid type id.
  • The statusId parameters must be a valid status id.
  • The order parameter must be a valid parameters of the TaskManagerTask class. Common used parameters are "subject", "start", "end", "progress", "owner".  More information at javadoc documentation.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            long statusId = 1; // A valid status id
            String order = "start"; // A valid TaskManagerTask class parameter name used in HQL query
            for (Task task : OKMTask.getInstance().getFinished(null, projectId, typeId, statusId, order)) {
                System.out.println(task);
            }
            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getFinished

Description:

MethodReturn valuesDescription

getFinished(String token, long projectId, long typeId, long statusId, String order, int offset, int limit)

List<Task>

Retrieve a list of finished tasks assigned to a user, filtered and paginated.

Filter parameters description:

  • The projectId parameter must be a valid project id.
  • The typeId parameters must be a valid type id.
  • The statusId parameters must be a valid status id.
  • The order parameter must be a valid parameters of the TaskManagerTask class. Common used parameters are "subject", "start", "end", "progress", "owner".  More information at javadoc documentation.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            long statusId = 1; // A valid status id
            String order = "start"; // A valid TaskManagerTask class parameter name used in HQL query
            for (Task task : OKMTask.getInstance().getFinished(null, projectId, typeId, statusId, order, 0, 10)) {
                System.out.println(task);
            }
            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

countFinished

Description:

MethodReturn valuesDescription

countFinished(String token, long projectId, long typeId, long statusId)

Long

Return the number of finished tasks to a user.

Filter parameters description:

  • The projectId parameter must be a valid project id.
  • The typeId parameters must be a valid type id.
  • The statusId parameters must be a valid status id.

Example:

package com.openkm;

import com.openkm.api.OKMTask;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            long typeId = 1; // A valid type id
            long statusId = 1; // A valid status id
            long total = OKMTask.getInstance().countFinished(null, projectId, typeId, statusId);
            System.out.println(total);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

findStatus

Description:

MethodReturn valuesDescription

findStatus(String token, long statusId)

TaskStatus

Return a task status object by id.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskStatus;

public class Test {
    public static void main(String[] args) {
        try {
            long statusId = 1; // A valid status id
            TaskStatus ts = OKMTask.getInstance().findStatus(null, statusId);
            System.out.println(ts);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

findProject

Description:

MethodReturn valuesDescription

findProject(String token, long projectId)

TaskProject

Return a task project object by id.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskStatus;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 1; // A valid project id
            TaskProject tp = OKMTask.getInstance().findProject(null, projectId);
            System.out.println(tp);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

findType

Description:

MethodReturn valuesDescription

findType(String token, long typeId)

TaskType

Return a task type object by id.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskStatus;

public class Test {
    public static void main(String[] args) {
        try {
            long typeId = 1; // A valid type id
            TaskType tt = OKMTask.getInstance().findType(null, typeId);
            System.out.println(tt);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

findNote

Description:

MethodReturn valuesDescription

findNote(String token, long noteId)

TaskNote

Return a task note object by id.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskStatus;

public class Test {
    public static void main(String[] args) {
        try {
            long noteId = 15; // A valid note id
            TaskNote tn = OKMTask.getInstance().findNote(null, noteId);
            System.out.println(tn);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getStatuses

Description:

MethodReturn valuesDescription

getStatuses(String token)

List<TaskStatus>

Retrieve a list of all the task status.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskStatus;

public class Test {
    public static void main(String[] args) {
        try {
            for (TaskStatus ts : OKMTask.getInstance().getStatuses(null)) {
                System.out.println(ts);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getProjects

Description:

MethodReturn valuesDescription

getProjects(String token, boolean filterByActive)

List<TaskProject>

Retrieve a list of all the task projects.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskStatus;

public class Test {
    public static void main(String[] args) {
        try {
            for (TaskProject tp : OKMTask.getInstance().getProjects(null, true)) {
                System.out.println(tp);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getTypes

Description:

MethodReturn valuesDescription

getTypes(String token, boolean filterByActive)

List<TaskType>

Retrieve a list of all the task types.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskStatus;

public class Test {
    public static void main(String[] args) {
        try {
            for (TaskType tt : OKMTask.getInstance().getTypes(null, true)) {
                System.out.println(tt);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getNotes

Description:

MethodReturn valuesDescription

getNotes(String token, long taskId)

List<TaskNote>

Retrieve a list of all the notes of a task.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskNote;

public class Test {
    public static void main(String[] args) {
        try {
            long taskId = 1; // A valid task id
            for (TaskNote tn : OKMTask.getInstance().getNotes(null, taskId)) {
                System.out.println(tn);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

createStatus

Description:

MethodReturn valuesDescription

createStatus(String token, String name, boolean finish)

TaskStatus

Create a new task status.

Depending your logic, several status can be ending status. For example status named "closed" or "cancelled". The boolean parameter "finish" indicates if your status in an "ending status".

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskStatus;

public class Test {
    public static void main(String[] args) {
        try {
            TaskStatus ts = OKMTask.getInstance().createStatus(null, "cancelled", true);
            System.out.println(ts);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

createProject

Description:

MethodReturn valuesDescription

createProject(String token, String name, String description, boolean active)

TaskProject

Create a new task project.

The boolean parameter "active", indicates if your project is active or not.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskProject;

public class Test {
    public static void main(String[] args) {
        try {
            TaskProject tp = OKMTask.getInstance().createProject(null, "Project one", "Description", true);
            System.out.println(tp);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

createType

Description:

MethodReturn valuesDescription

createType(String token, String name, String description, boolean active)

TaskType

Create a new task type.

The boolean parameter "active", indicates if your type is active or not.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskType;

public class Test {
    public static void main(String[] args) {
        try {
            TaskType tt = OKMTask.getInstance().createType(null, "Type one", "Description", true);
            System.out.println(tt);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

createNote

Description:

MethodReturn valuesDescription

createNote(String token, long taskId, String text)

TaskNote

Create a new note to a task.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskNote;

public class Test {
    public static void main(String[] args) {
        try {
            long taskId = 15; // A valid task id
            TaskNote tn = OKMTask.getInstance().createNote(null, taskId, "New note");
            System.out.println(tn);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

updateStatus

Description:

MethodReturn valuesDescription

updateStatus(String token, long id, String name, boolean finish)

TaskStatus

Update a task status.

Depending your logic, several status can be ending status. For example status named "closed" or "cancelled". The boolean parameter "finish" indicates if your status in an "ending status".

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskStatus;

public class Test {
    public static void main(String[] args) {
        try {
            long taskId = 15; // A valid task id
            TaskStatus ts = OKMTask.getInstance().findStatus(null, taskId);
            System.out.println(ts);
            ts = OKMTask.getInstance().updateStatus(null, taskId, "cancelled", true);
            System.out.println(ts);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

updateProject

Description:

MethodReturn valuesDescription

updateProject(String token, long id, String name, String description, boolean active)

TaskProject

Update a task project.

The boolean parameter "active", indicates if your project is active or not.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskProject;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 5; // A valid project id
            TaskProject tp = OKMTask.getInstance().findProject(null, projectId);
            System.out.println(tp);
            tp = OKMTask.getInstance().updateProject(null, projectId, "cancelled", "Description", false);
            System.out.println(tp);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

updateType

Description:

MethodReturn valuesDescription

updateType(String token, long id, String name, String description, boolean active)

TaskType

Update a task type.

The boolean parameter "active", indicates if your type is active or not.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskType;

public class Test {
    public static void main(String[] args) {
        try {
            long typeId = 12; // A valid type id
            TaskType tp = OKMTask.getInstance().findType(null, typeId);
            System.out.println(tp);
            tp = OKMTask.getInstance().updateType(null, typeId, "Type one", "Description", false);
            System.out.println(tp);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

updateNote

Description:

MethodReturn valuesDescription

updateNote(String token, long id, String text)

TaskNote

Update note of a task.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.TaskNote;

public class Test {
    public static void main(String[] args) {
        try {
            long noteId = 15; // A valid note id
            TaskNote tn = OKMTask.getInstance().updateNote(null, noteId, "Note updated");
            System.out.println(tn);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

deleteStatus

Description:

MethodReturn valuesDescription

deleteStatus(String token, long statusId)

void

Delete a task status.

Example:

package com.openkm;

import com.openkm.api.OKMTask;

public class Test {
    public static void main(String[] args) {
        try {
            long statusId = 15; // A valid status id
            OKMTask.getInstance().deleteStatus(null, statusId);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

deleteProject

Description:

MethodReturn valuesDescription

deleteProject(String token, long projectId)

void

Delete a task project.

Example:

package com.openkm;

import com.openkm.api.OKMTask;

public class Test {
    public static void main(String[] args) {
        try {
            long projectId = 5; // A valid project id
            OKMTask.getInstance().deleteProject(null, projectId);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

deleteType

Description:

MethodReturn valuesDescription

deleteType(String token, long typeId)

void

Delete a task type.

Example:

package com.openkm;

import com.openkm.api.OKMTask;

public class Test {
    public static void main(String[] args) {
        try {
            long typeId = 12; // A valid type id
            OKMTask.getInstance().deleteType(null, typeId);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

deleteNote

Description:

MethodReturn valuesDescription

deleteNote(String token, long noteId)

void

Delete note of a task.

Example:

package com.openkm;

import com.openkm.api.OKMTask;

public class Test {
    public static void main(String[] args) {
        try {
            long noteId = 22; // A valid note id
            OKMTask.getInstance().deleteNote(null, noteId);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getByNode

Description:

MethodReturn valuesDescription

getByNode(String token, String nodeUuid)

List<Task>

Return the list of task assigned to an specific node.

Example:

package com.openkm;

import com.openkm.api.OKMTask;
import com.openkm.bean.Task;

public class Test {
    public static void main(String[] args) {
        try {
            String uuid = "18b57e55-f22a-4d2d-bb28-c83bc7ea1375" // A valid uuid
            for (Task task : OKMTask.getInstance().getByNode(null, uuid)) {
                System.out.println(task);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }