Package org.apache.syncope.common.types

Examples of org.apache.syncope.common.types.TaskType


        if (taskTO instanceof SyncTaskTO || taskTO instanceof SchedTaskTO) {
            createdTask = taskController.createSchedTaskInternal((SchedTaskTO) taskTO);
        } else {
            throw new BadRequestException();
        }
        TaskType taskType = getTaskType(taskTO.getClass());
        URI location = uriInfo.getAbsolutePathBuilder().path(taskType.toString() + "/" + createdTask.getId()).build();
        return Response.created(location).header(SyncopeConstants.REST_HEADER_ID, createdTask.getId()).build();
    }
View Full Code Here


    public <T extends TaskTO> List<T> listTasks(final Class<T> reference, final int page, final int size) {
        return (List<T>) getService(TaskService.class).list(getTaskType(reference), page, size);
    }

    private TaskType getTaskType(final Class<?> reference) {
        TaskType result = null;
        if (PropagationTaskTO.class.equals(reference)) {
            result = TaskType.PROPAGATION;
        } else if (NotificationTaskTO.class.equals(reference)) {
            result = TaskType.NOTIFICATION;
        } else if (SchedTaskTO.class.equals(reference)) {
View Full Code Here

    public static TaskUtil getInstance(final TaskType type) {
        return new TaskUtil(type);
    }

    public static TaskUtil getInstance(final Task task) {
        TaskType type;
        if (task instanceof SyncTask) {
            type = TaskType.SYNCHRONIZATION;
        } else if (task instanceof PushTask) {
            type = TaskType.PUSH;
        } else if (task instanceof SchedTask) {
View Full Code Here

        return getInstance(type);
    }

    public static TaskUtil getInstance(Class<? extends AbstractTaskTO> taskClass) {
        TaskType type;
        if (taskClass == PropagationTaskTO.class) {
            type = TaskType.PROPAGATION;
        } else if (taskClass == NotificationTaskTO.class) {
            type = TaskType.NOTIFICATION;
        } else if (taskClass == SchedTaskTO.class) {
View Full Code Here

        return (List<T>) getService(TaskService.class).list(getTaskType(reference), page, size, toOrderBy(sort)).
                getResult();
    }

    private TaskType getTaskType(final Class<?> reference) {
        TaskType result = null;
        if (PropagationTaskTO.class.equals(reference)) {
            result = TaskType.PROPAGATION;
        } else if (NotificationTaskTO.class.equals(reference)) {
            result = TaskType.NOTIFICATION;
        } else if (SchedTaskTO.class.equals(reference)) {
View Full Code Here

TOP

Related Classes of org.apache.syncope.common.types.TaskType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.