Examples of update()


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

        // 3. try to update as verdi, not owner of role 7 - fail
        RoleService roleService2 = setupCredentials(roleService, RoleService.class, "verdi", ADMIN_PWD);

        try {
            roleService2.update(roleMod.getId(), roleMod);
            fail();
        } catch (HttpStatusCodeException e) {
            assertEquals(HttpStatus.FORBIDDEN, e.getStatusCode());
        } catch (AccessControlException e) {
            assertNotNull(e);
View Full Code Here

Examples of org.apache.syncope.common.services.SchemaService.update()

        schemaTO = schemaService2.read(AttributableType.USER, SchemaType.NORMAL, schemaName);
        assertNotNull(schemaTO);

        // 5. update the schema create above (as user) - failure
        try {
            schemaService2.update(AttributableType.ROLE, SchemaType.NORMAL, schemaName, schemaTO);
            fail("Schemaupdate as user schould not work");
        } catch (HttpClientErrorException e) {
            assertNotNull(e);
            assertEquals(HttpStatus.FORBIDDEN, e.getStatusCode());
        } catch (AccessControlException e) {
View Full Code Here

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

        assertNotNull(user);

        UserMod userMod = new UserMod();
        userMod.setPassword("password321");

        response = noContentService.update(user.getId(), userMod);
        assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatus());
        assertEquals(Preference.RETURN_NO_CONTENT.toString(), response.getHeaderString(RESTHeaders.PREFERENCE_APPLIED));
        assertEquals(StringUtils.EMPTY, IOUtils.toString((InputStream) response.getEntity()));

        response = noContentService.delete(user.getId());
View Full Code Here

Examples of org.apache.tuscany.sca.itest.allowspassbyreference.AServiceClient.update()

    private void test(String serviceName) {
        AServiceClient client = node.getService(AServiceClient.class, serviceName);
        int id = client.create("A");
        String state = client.read(id);
        Assert.assertEquals("A", state);
        state = client.update(id, "B");
        Assert.assertEquals("B", state);
        client.delete(id);
    }

}
View Full Code Here

Examples of org.apache.uima.ducc.rm.scheduler.Share.update()

                    Share   s = new Share(id, m, j, m.getShareOrder());        // guess share order; scheduler will reset when it recovers job
                    long mem = proc.getResidentMemory();

                    logger.info(methodName, j.getId(), "Assigning share in state", state, "pid", pid, "for recovery", s.toString());
                    j.recoverShare(s);
                    s.update(j.getId(), mem, state, proc.getTimeWindowInit(), proc.getTimeWindowRun(), pid);                   
                }
            }
            logger.info(methodName, j.getId(), "Scheduling for recovery.");
            scheduler.signalRecovery(j);
        } else {
View Full Code Here

Examples of org.apache.uima.ducc.ws.IListenerOrchestrator.update()

 
  public void update(OrchestratorStateDuccEvent duccEvent) {
    Enumeration<IListenerOrchestrator> listeners = mapListenerOrchestrator.keys();
    while(listeners.hasMoreElements()) {
      IListenerOrchestrator listener = listeners.nextElement();
      listener.update(duccEvent);
    }
  }
}
View Full Code Here

Examples of org.apache.ws.jaxme.PM.update()

  public void testUpdate() throws Exception {
    PM pm = getPM();
    Iterator iter = pm.select("IPADDRESS='192.168.5.127'");
    Session session = (Session) iter.next();
    session.setIpAddress("192.168.5.128");
    pm.update(session);

    assertTrue(!pm.select("IPADDRESS='192.168.5.127'").hasNext());
    iter = pm.select("IPADDRESS='192.168.5.128'");
    assertTrue(iter.hasNext());
    session = (Session) iter.next();
View Full Code Here

Examples of org.apache.xml.security.algorithms.MessageDigestAlgorithm.update()

      try {
         byte[] data = this.getReferencedBytes();
         MessageDigestAlgorithm mda = this.getMessageDigestAlgorithm();

         mda.reset();
         mda.update(data);

         byte calculatedDigestValue[] = mda.digest();

         //J-
         if (data.length < 20) {
View Full Code Here

Examples of org.apache.xml.security.algorithms.SignatureAlgorithm.update()

  public void testSameKeySeveralAlgorithmSigning() throws Exception {
    Document doc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
    SignatureAlgorithm signatureAlgorithm = new SignatureAlgorithm(doc,XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1);
    PrivateKey pk=KeyPairGenerator.getInstance("RSA").genKeyPair().getPrivate();
    signatureAlgorithm.initSign(pk);
    signatureAlgorithm.update((byte)2);
    signatureAlgorithm.sign();
    SignatureAlgorithm otherSignatureAlgorithm =
             new SignatureAlgorithm(doc, XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256);

    try {
View Full Code Here

Examples of org.apdplat.platform.service.ServiceFacade.update()

                            LOG.info("开始记录用户 "+user.getUsername()+" 的注销日志");
                            userLogin.setLogoutTime(new Date());
                            userLogin.setOnlineTime(userLogin.getLogoutTime().getTime()-userLogin.getLoginTime().getTime());
                            //更新userLogin
                            ServiceFacade serviceFacade = SpringContextUtils.getBean("serviceFacadeForLog");
                            serviceFacade.update(userLogin);
                            logs.remove(user.getUsername());
                        }else{
                            LOG.info("无法记录用户 "+user.getUsername()+" 的注销日志,因为用户的登录日志不存在");
                        }
                    }else{
View Full Code Here
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.