use of bakery.user.v1.User in project mybatis-issues by harawata.
the class ConfPropWithSpringTest method shouldGetAUser.
@Test
public void shouldGetAUser() {
User user = mapper.getUser(1);
Assert.assertEquals("User1", user.getName());
}
use of bakery.user.v1.User in project mybatis-issues by harawata.
the class ConfPropWithSpringTest method shouldInsertAUser.
@Test
public void shouldInsertAUser() {
User user = new User();
user.setId(2);
user.setName("User2");
mapper.insertUser(user);
}
use of bakery.user.v1.User in project iom-blueprint-project by intershop.
the class RestAuthenticationBean method authorizeOperation.
public void authorizeOperation(HttpServletRequest request, RightDefDOEnumInterface rightDefDO) throws AuthorizeException, UserNotFoundException {
User usr;
try {
String[] credentials = CustomizationUtilityStatic.getCredentialsFromHttpServletRequest(request);
String userName = credentials[0];
String password = credentials[1];
usr = this.userSecurityService.createUserSession(userName, password, EnumInitiator.WEBSERVICE);
} catch (AuthorizeException e) {
throw new UserNotFoundException(new NamedId("userDO", "userName"));
}
checkpointSecurityService.check(usr.getSessionKey(), rightDefDO);
}
use of bakery.user.v1.User in project petals-se-flowable by petalslink.
the class GetUserOperation method doExecute.
@Override
public GetUserResponse doExecute(final GetUser incomingObject) throws Exception {
final UserQuery userQuery = this.identityService.createUserQuery();
userQuery.userId(incomingObject.getId());
final List<org.flowable.idm.api.User> users = userQuery.list();
if (users.isEmpty()) {
throw new UnknownUserException(incomingObject.getId());
} else {
final org.flowable.idm.api.User foundUser = users.get(0);
final User user = new User();
user.setId(foundUser.getId());
user.setFirstName(foundUser.getFirstName());
user.setLastName(foundUser.getLastName());
user.setEmail(foundUser.getEmail());
final GetUserResponse response = new GetUserResponse();
response.setUser(user);
return response;
}
}
use of bakery.user.v1.User in project petals-se-flowable by petalslink.
the class GetUserInvocationTest method invalidRequest_WsdlCompliantRequest.
/**
* <p>
* Check the processing of the integration service {@link GetUserOperation} when:
* </p>
* <ul>
* <li>an invalid request is sent,</li>
* <li>the request content is compliant to the XML schema defined in WSDL</li>
* </ul>
* <p>
* Expected results:
* </p>
* <ul>
* <li>no error occurs</li>
* <li>a fault occurs about the invalid request</li>
* </ul>
*/
@Test
public void invalidRequest_WsdlCompliantRequest() throws Exception {
// We use a response as request
final GetUserResponse request = new GetUserResponse();
request.setUser(new User());
this.testInvalidRequest_WsdlCompliant(NATIVE_USER_SVC_CFG, ITG_USER_PORT_TYPE, ITG_USER_SERVICE, ITG_OP_GETUSER, request);
}
Aggregations