Package com.openii.moa.objects.resources.v1_0

Examples of com.openii.moa.objects.resources.v1_0.Identifier


    if (idList==null || idList.size()==0) {
      return null;
    }
    String password = querySpec.getCandidatePassword();
    for (int i=0;i<idList.size();i++) {
      Identifier id=(Identifier)idList.get(i);
      String idType = id.getType();
      if (myIdType.equalsIgnoreCase(idType)) {
        System.out.println("ID match");
        String idValue = id.getValue();
        System.out.println("value="+idValue);
        if (password.indexOf(idValue)!=-1) {
          ValidationStatus vs=new ValidationStatus();
          try {
            vs.setStatusCode(validationStatusCode);
View Full Code Here


    String password = querySpec.getCandidatePassword();
    if (password.matches(".*[a-z].*") && password.matches(".*[A-Z].*")
        && password.matches(".*[0-9].*")) {
      return null;
    } else {
      ValidationStatus vs=new ValidationStatus();
      try {
        vs.setStatusCode(validationStatusCode);
        vs.setExplanation(explanation);
        vs.setDescription(description);
      } catch (EnterpriseFieldException e) {
        e.printStackTrace();
        throw new PasswordValidationException(e.getMessage());
      }
      return vs;
View Full Code Here

    }
    int l = querySpec.getCandidatePassword().length();
    if (l>=minimum && l<=maximum) {
      return null;
    } else {
      ValidationStatus vs=new ValidationStatus();
      try {
        vs.setStatusCode(validationStatusCode);
        vs.setExplanation(explanation);
        if (l<minimum) {
          vs.setDescription(minimumLengthDescription);
        }
        if (l>maximum) {
          vs.setDescription(maximumLengthDescription);
        }
      } catch (EnterpriseFieldException e) {
        e.printStackTrace();
        throw new PasswordValidationException(e.getMessage());
      }
View Full Code Here

      if (myIdType.equalsIgnoreCase(idType)) {
        System.out.println("ID match");
        String idValue = id.getValue();
        System.out.println("value="+idValue);
        if (password.indexOf(idValue)!=-1) {
          ValidationStatus vs=new ValidationStatus();
          try {
            vs.setStatusCode(validationStatusCode);
            vs.setExplanation(explanation);
            vs.setDescription(description);
          } catch (EnterpriseFieldException e) {
            e.printStackTrace();
            throw new PasswordValidationException(e.getMessage());
          }
          return vs;         
View Full Code Here

        maps.setReplyTo(RMUtils.createReference(DECOUPLED_URL));
       
        message.put(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND, maps);

        TerminateSequenceType ts = new TerminateSequenceType();
        Identifier sid = new Identifier();
        sid.setValue(sidstr);
        ts.setIdentifier(sid);
        Object tst = ProtocolVariation.RM10WSA200408.getWSRMNamespace().equals(protocol.getWSRMNamespace())
            ? ts : ProtocolVariation.RM10WSA200408.getCodec().convertReceivedTerminateSequence(ts);
        MessageContentsList contents = new MessageContentsList();
        contents.add(tst);
View Full Code Here

        maps.setReplyTo(RMUtils.createReference(DECOUPLED_URL));
       
        message.put(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND, maps);

        TerminateSequenceType ts = new TerminateSequenceType();
        Identifier sid = new Identifier();
        sid.setValue(sidstr);
        ts.setIdentifier(sid);
        Object tst = ProtocolVariation.RM10WSA200408.getWSRMNamespace().equals(protocol.getWSRMNamespace())
            ? ts : ProtocolVariation.RM10WSA200408.getCodec().convertReceivedTerminateSequence(ts);
        MessageContentsList contents = new MessageContentsList();
        contents.add(tst);
View Full Code Here

    public void testGetExistingSequence() throws NoSuchMethodException, SequenceFault, RMException {
        Method m = RMManager.class
           .getDeclaredMethod("getSource", new Class[] {Message.class});
        manager = control.createMock(RMManager.class, new Method[] {m});
        Message message = control.createMock(Message.class);
        Identifier inSid = control.createMock(Identifier.class);
       
        Source source = control.createMock(Source.class);
        EasyMock.expect(manager.getSource(message)).andReturn(source);
        SourceSequence sseq = control.createMock(SourceSequence.class);
        EasyMock.expect(source.getCurrent(inSid)).andReturn(sseq);
View Full Code Here

        EasyMock.expect(exchange.getOutMessage()).andReturn(message).anyTimes();
        EasyMock.expect(exchange.getInMessage()).andReturn(null).anyTimes();
        EasyMock.expect(exchange.getOutFaultMessage()).andReturn(null).anyTimes();
        Conduit conduit = control.createMock(Conduit.class);
        EasyMock.expect(exchange.getConduit(message)).andReturn(conduit).anyTimes();
        Identifier inSid = control.createMock(Identifier.class);       
        AddressingProperties maps = control.createMock(AddressingProperties.class);
        Source source = control.createMock(Source.class);
        EasyMock.expect(manager.getSource(message)).andReturn(source);
        EasyMock.expect(source.getCurrent(inSid)).andReturn(null);
        AttributedURIType uri = control.createMock(AttributedURIType.class);
View Full Code Here

        }
        Collection<RMMessage> ms = new ArrayList<RMMessage>();
        if (null != m) {
            ms.add(m);
        }
        Identifier id = new Identifier();
        id.setValue("S1");
        EasyMock.expect(ss.getIdentifier()).andReturn(id).times(null == m ? 1 : 2);
        EasyMock.expect(store.getMessages(id, true)).andReturn(ms);
       
       
        RMEndpoint rme = control.createMock(RMEndpoint.class);
View Full Code Here

        manager = new RMManager();
        assertNull(manager.getIdGenerator());
        SequenceIdentifierGenerator generator = manager.new DefaultSequenceIdentifierGenerator();
        manager.setIdGenerator(generator);
        assertSame(generator, manager.getIdGenerator());
        Identifier id1 = generator.generateSequenceIdentifier();
        assertNotNull(id1);
        assertNotNull(id1.getValue());
        Identifier id2 = generator.generateSequenceIdentifier();
        assertTrue(id1 != id2);
        assertTrue(!id1.getValue().equals(id2.getValue()));    
        control.replay();
    }  
View Full Code Here

TOP

Related Classes of com.openii.moa.objects.resources.v1_0.Identifier

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.