Search in sources :

Example 1 with User

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());
}
Also used : User(issue723.User) Test(org.junit.Test)

Example 2 with User

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);
}
Also used : User(issue723.User) Test(org.junit.Test)

Example 3 with 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);
}
Also used : UserNotFoundException(bakery.persistence.dataobject.configuration.user.UserNotFoundException) User(bakery.user.v1.User) AuthorizeException(bakery.security.exception.AuthorizeException) NamedId(bakery.util.NamedId)

Example 4 with User

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;
    }
}
Also used : UnknownUser(org.ow2.petals.components.flowable.generic._1.UnknownUser) User(org.ow2.petals.components.flowable.generic._1.User) GetUser(org.ow2.petals.components.flowable.generic._1.GetUser) GetUserResponse(org.ow2.petals.components.flowable.generic._1.GetUserResponse) UserQuery(org.flowable.idm.api.UserQuery) UnknownUserException(org.ow2.petals.flowable.incoming.integration.exception.UnknownUserException)

Example 5 with User

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);
}
Also used : UnknownUser(org.ow2.petals.components.flowable.generic._1.UnknownUser) GetUser(org.ow2.petals.components.flowable.generic._1.GetUser) User(org.ow2.petals.components.flowable.generic._1.User) GetUserResponse(org.ow2.petals.components.flowable.generic._1.GetUserResponse) Test(org.junit.Test)

Aggregations

User (pl.plajer.villagedefense3.User)30 Player (org.bukkit.entity.Player)18 User (org.gluu.oxtrust.model.scim2.User)17 User (org.openstack4j.model.identity.v3.User)13 EventHandler (org.bukkit.event.EventHandler)11 Test (org.junit.Test)11 GluuCustomPerson (org.gluu.oxtrust.model.GluuCustomPerson)10 ScimPatchUser (org.gluu.oxtrust.model.scim2.ScimPatchUser)10 Date (java.util.Date)9 ArrayList (java.util.ArrayList)8 Arena (pl.plajer.villagedefense3.arena.Arena)8 User (me.zhanghai.android.douya.network.api.info.apiv2.User)7 User (com.google.api.ads.admanager.axis.v202108.User)6 UserServiceInterface (com.google.api.ads.admanager.axis.v202108.UserServiceInterface)6 User (com.google.api.ads.admanager.axis.v202111.User)6 UserServiceInterface (com.google.api.ads.admanager.axis.v202111.UserServiceInterface)6 User (com.google.api.ads.admanager.axis.v202202.User)6 UserServiceInterface (com.google.api.ads.admanager.axis.v202202.UserServiceInterface)6 SimpleUser (me.zhanghai.android.douya.network.api.info.apiv2.SimpleUser)6 DuplicateEntryException (org.gluu.site.ldap.exception.DuplicateEntryException)6