Examples of Subject


Examples of com.volantis.mcs.themes.Subject

     */
    private void appendSelected(CombinatorEnum combinator) {

        int index = getSelectedIndex();

        Subject subject = (Subject) getSelectedObject();
        SelectorSequence sequence =
                (SelectorSequence) getObjectControl().getValue();
        CombinedSelector combined = subject.append(combinator, sequence);

        removeFromList(index);
        addToList(combined, index);
        setSelectedIndex(index);

View Full Code Here

Examples of de.itemis.tooling.xturtle.xturtle.Subject

  //Using its URI in the reference description ensures that "find references" gives
  //a (more) meaningful label in the search result view
  private URI getExportedSubjectUri(EObject ref) {
    Triples triples = EcoreUtil2.getContainerOfType(ref, Triples.class);
    if(triples!=null){
      Subject subject = triples.getSubject();
      if(subject instanceof Resource){
        org.eclipse.emf.ecore.resource.Resource res = subject.eResource();
        return res.getURI().appendFragment(res.getURIFragment(subject));
      }
    }
    return null;
  }
View Full Code Here

Examples of edu.uchicago.grouperabi.Subject

 
  @Test
  public void testGetMemberships() throws GrouperABIException, IOException {
    GrouperQueryEngine gqe = getQueryEngine();
   
    ArrayList<Group> results = gqe.getMemberships(new Subject("20967693K"));
   
    for(Group g: results){
      System.out.println(g.getName());
    }
   
View Full Code Here

Examples of gabriel.Subject

        Pointcuts.ALL_METHODS, new AccessInterceptor(methodAccessManager));

    ProxyFactory proxyFactory = ProxyFactory.getInstance(aspects);

    System.out.println("Setting our subject to \"We\" with empty principals.");
    Subject subject = new Subject("We");
    Set principals = new HashSet();
    subject.setPrincipals(principals);
    Subject.set(subject);

    // We create an object which has protected methods
    SecureObject object = (SecureObject) proxyFactory.wrap(new SecureObjectImpl("Dont change me!"));
    System.out.print("We try to call setName() on \""+object.getName()+"\" ... ");
    try {
      object.setName("Changed!");
    } catch (Exception e) {
      System.out.println("denied.");
    }
    System.out.println("object.name = " + object.getName());

    System.out.println("Adding \"ExampleUser\" to our principals.");
    // We are now member of group "ExampleUser
    principals.add(new Principal("ExampleUser"));
    // We have to set the principals again as they are copied not referenced
    // inside subject.
    subject.setPrincipals(principals);
    System.out.print("We try to call setName() on \""+object.getName()+"\" ... ");
    object.setName("changed!");
    System.out.println("changed.");
    System.out.println("object.name = " + object.getName());
  }
View Full Code Here

Examples of helloworld.behavioral.observer.Subject

        helloWorldMementoOriginator.set("Hello Whatever!");
        helloWorldMementoOriginator.restoreFromMemento(memento);
        System.out.println(helloWorldMementoOriginator.helloWorld());

        System.out.println("19. Observer: ");
        Subject subject = new Subject().attach(new HelloWorldObserver());
        subject.notifyObservers();

        System.out.println("20. State: ");
        HelloWorldStateContext helloWorldStateContext = new HelloWorldStateContext();
        HelloWorld stateHelloWorld = helloWorldStateContext.appendWord("Hello").appendWord("State");
        System.out.println(stateHelloWorld.helloWorld());
View Full Code Here

Examples of javax.security.auth.Subject

               
        final String baseUsername = getBaseUsername(username);

      if (onlyallowPassthrough) {
            for (String domain:getDomainsForUser(domains, username)) {
            Subject existing = this.securityHelper.getSubjectInContext(domain);
            if (existing != null) {
          this.userName = getUserName(existing)+AT+domain;
          this.securitydomain = domain;    
          this.loginContext = createLoginContext(domain, existing);
          return;
View Full Code Here

Examples of javax.security.auth.Subject

    public Object getSecurityContext() {
      Object sc = null;
        if (this.loginContext != null) {
          sc = this.securityHelper.getSecurityContext(this.securitydomain);
          if ( sc == null){
            Subject subject = this.loginContext.getSubject();
            Principal principal = null;
            for(Principal p:subject.getPrincipals()) {
              if (this.userName.startsWith(p.getName())) {
                principal = p;
                break;
              }
            }
View Full Code Here

Examples of javax.security.auth.Subject

    String requestSAMLAssertionPartName=_config.getAttribute(REQUEST_SAML_PART_NAME);

    if (requestSAMLAssertionPartName != null) {
     
      // Check if PicketLink SAML creditial is available
      Subject subject = Subject.getSubject(AccessController.getContext());
     
      if (subject != null) {
        org.picketlink.identity.federation.core.wstrust.SamlCredential samlCred=null;
       
        for (Object cred : subject.getPublicCredentials()) {
          if (cred instanceof org.picketlink.identity.federation.core.wstrust.SamlCredential) {
            samlCred = (org.picketlink.identity.federation.core.wstrust.SamlCredential)cred;
            break;
          }
        }
View Full Code Here

Examples of javax.security.auth.Subject

{
  public DisplaySubjectAction(final ConfigTree config) {}

  public Message process(final Message message) throws Exception
  {
    Subject subject = Subject.getSubject(AccessController.getContext());
    System.out.println("Subject in MyListenerAction : " + subject);
    return message;
  }
View Full Code Here

Examples of javax.security.auth.Subject

      loginContext.login();
    } catch (LoginException e) {
      throw new RuntimeException(e);
    }
    assertTrue(true); //made it till here
    Subject subject = loginContext.getSubject();
    Subject.doAsPrivileged(subject, new PrivilegedAction<Object>() {

      public Object run() {
        AccessController.checkPermission(new GVSImpersonatePermission(new SourceImpl(userSourceURL)));
        return null;
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.