Examples of create()


Examples of org.apache.syncope.common.services.RoleService.create()

        SyncopeClient noContentclient = clientFactory.create(ADMIN_UNAME, ADMIN_PWD);
        RoleService noContentService = noContentclient.prefer(RoleService.class, Preference.RETURN_NO_CONTENT);

        RoleTO role = buildRoleTO("noContent");

        Response response = noContentService.create(role);
        assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
        assertEquals(Preference.RETURN_NO_CONTENT.toString(), response.getHeaderString(RESTHeaders.PREFERENCE_APPLIED));
        assertEquals(StringUtils.EMPTY, IOUtils.toString((InputStream) response.getEntity()));

        role = getObject(response.getLocation(), RoleService.class, RoleTO.class);

Examples of org.apache.syncope.common.services.UserSelfService.create()

        SyncopeClient anonClient = clientFactory.createAnonymous();
        UserSelfService noContentService = anonClient.prefer(UserSelfService.class, Preference.RETURN_NO_CONTENT);

        UserTO user = UserTestITCase.getUniqueSampleTO("nocontent-anonymous@syncope.apache.org");

        Response response = noContentService.create(user, true);
        assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
        assertEquals(Preference.RETURN_NO_CONTENT.toString(), response.getHeaderString(RESTHeaders.PREFERENCE_APPLIED));
        assertEquals(StringUtils.EMPTY, IOUtils.toString((InputStream) response.getEntity()));
    }
}

Examples of org.apache.syncope.common.services.UserService.create()

        UserTO role1User = UserTestITCase.getUniqueSampleTO("syncope48user@apache.org");
        membershipTO = new MembershipTO();
        membershipTO.setRoleId(1L);
        role1User.addMembership(membershipTO);

        response = userService2.create(role1User);
        assertNotNull(response);
        role1User = response.readEntity(UserTO.class);
        assertNotNull(role1User);
    }

Examples of org.apache.tapestry.annotations.ApplicationState.create()

        String readMethodName = transformation.newMemberName("read", fieldName);

        TransformMethodSignature readMethodSignature = new TransformMethodSignature(Modifier.PRIVATE, fieldType,
                                                                                    readMethodName, null, null);

        String methodName = annotation.create() ? "get" : "getIfExists";

        String body = format("return (%s) %s.%s(%s);", fieldType, managerFieldName, methodName, typeFieldName);

        transformation.addMethod(readMethodSignature, body);

Examples of org.apache.tapestry.hibernate.HibernateSessionSource.create()

          new PackageNameHibernateConfigurer(packageManager, new ClassNameLocatorImpl()));
     
      replay();
        HibernateSessionSource source = new HibernateSessionSourceImpl(_log, filters);

        Session session = source.create();
    assertNotNull(session);
   
    // make sure it found the entity in the package
    ClassMetadata meta = session.getSessionFactory().getClassMetadata(User.class);
    assertEquals(meta.getEntityName(), "org.example.app0.entities.User");

Examples of org.apache.tapestry.services.ApplicationStateCreator.create()

            public Object answer() throws Throwable
            {
                ApplicationStateCreator creator = (ApplicationStateCreator) EasyMock
                        .getCurrentArguments()[1];

                Object aso = creator.create();

                holder.put(aso);

                return aso;
            }

Examples of org.apache.tapestry.services.BeanModelSource.create()

        train_getMessages(resources, messages);
        stub_contains(messages, false);

        replay();

        _model = source.create(Datum.class, false, resources);

        verify();
    }

    @AfterClass

Examples of org.apache.tapestry.services.ValueEncoderFactory.create()

        if (parameterType == null) return null;

        ValueEncoderFactory factory = _registry.get(parameterType);

        return factory.create(parameterType);
    }

    public void objectWasInvalidated()
    {
        _registry.clearCache();

Examples of org.apache.tapestry.vlib.ejb.IBookHome.create()

    {
        IBookHome home = getBookHome();

        attributes.put("dateAdded", new Timestamp(System.currentTimeMillis()));

        IBook book = home.create(attributes);

        return (Integer) book.getPrimaryKey();
    }

    /**
 

Examples of org.apache.tapestry.vlib.ejb.IBookQueryHome.create()

        {
            IBookQueryHome home = global.getBookQueryHome();

            try
            {
                result = home.create();

                break;
            }
            catch (CreateException ex)
            {
TOP
Copyright © 2018 www.massapi.com. 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.