Package javax.ws.rs

Examples of javax.ws.rs.BadRequestException


    public Response create(final TaskTO taskTO) {
        TaskTO createdTask;
        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


        if (taskTO instanceof SyncTaskTO) {
            taskController.updateSync((SyncTaskTO) taskTO);
        } else if (taskTO instanceof SchedTaskTO) {
            taskController.updateSched((SchedTaskTO) taskTO);
        } else {
            throw new BadRequestException();
        }
    }
View Full Code Here

            case AUDIT:
                try {
                    loggerController.disableAudit(AuditLoggerName.fromLoggerName(name));
                } catch (IllegalArgumentException e) {
                    throw new BadRequestException(e);
                } catch (ParseException e) {
                    throw new BadRequestException(e);
                }
                break;

            default:
                throw new BadRequestException();
        }

    }
View Full Code Here

            case AUDIT:
                List<AuditLoggerName> auditLogger = loggerController.listAudits();
                return CollectionWrapper.unwrapLogger(auditLogger);

            default:
                throw new BadRequestException();
        }
    }
View Full Code Here

            case AUDIT:
                try {
                    loggerController.enableAudit(AuditLoggerName.fromLoggerName(name));
                } catch (IllegalArgumentException e) {
                    throw new BadRequestException(e);
                } catch (ParseException e) {
                    throw new BadRequestException(e);
                }
                break;

            default:
                throw new BadRequestException();
        }
    }
View Full Code Here

            case GLOBAL_SYNC:
                result = (T) policyController.getGlobalSyncPolicy();
                break;

            default:
                throw new BadRequestException();
        }

        return result;
    }
View Full Code Here

                        values().iterator().next();
                result = CollectionWrapper.wrapSyncCorrelationRuleClasses(classes);
                break;

            default:
                throw new BadRequestException();
        }

        return result;
    }
View Full Code Here

            case USER:
                return workflowController.getUserDefinition();
            case ROLE:
                return workflowController.getRoleDefinition();
            default:
                throw new BadRequestException();
        }
    }
View Full Code Here

                break;
            case ROLE:
                workflowController.updateRoleDefinition(definition);
                break;
            default:
                throw new BadRequestException();
        }
    }
View Full Code Here

            case USER:
                return CollectionWrapper.wrapStrings(workflowController.getDefinedUserTasks());
            case ROLE:
                return CollectionWrapper.wrapStrings(workflowController.getDefinedUserTasks());
            default:
                throw new BadRequestException();
        }
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.BadRequestException

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.