Examples of Authority


Examples of org.openxri.store.Authority

      throw ex2;
    }

    XRIAuthority authorityPath = new GCSAuthority(utf8Namespace);

    Authority namespaceAuthority;

    try {

      namespaceAuthority = this.store.localLookup(authorityPath);
    } catch (StoreException ex) {
View Full Code Here

Examples of org.openxri.store.Authority

      throw ex2;
    }

    XRIAuthority authorityPath = new GCSAuthority(utf8Namespace);

    Authority parentAuthority;

    try {

      parentAuthority = this.store.localLookup(authorityPath);

      if (parentAuthority == null) throw new ServerNotFoundException("Namespace authority " + namespace + " not found.");
    } catch (StoreException ex) {

      ServerException ex2 = new ServerInternalException("Error while finding namespace authority " + namespace + ": " + ex.getMessage(), ex);
      log.warn(ex2);
      throw ex2;
    }

    // the big goal is to make an XRDS, consisting of one or more XRDs

    XRDS xrds = new XRDS();
    boolean ret;

    // give subclasses a chance to init the XRDS before we begin

    ret = this.initXRDS(
        xrds,
        query,
        signed);

    // if a subclass returned true, it doesn't want us to do any more work

    if (ret == true) {

      log.debug("Subclass handled XRDS completely. Returning it without any more work.");
      return(xrds);
    }

    // generate XRDs for all subsegments in the request

    String utf8Query;

    try {

      utf8Query = IRIUtils.IRItoXRI(IRIUtils.URItoIRI(query));
    } catch (Exception ex) {

      ServerException ex2 = new ServerInternalException("Unsupported encoding in query: " + ex.getMessage(), ex);
      log.warn(ex2);
      throw ex2;
    }

    XRISegment segment = new XRISegment(utf8Query);

    for (int i=0; i<segment.getNumSubSegments(); i++) {

      String subSegmentName = segment.getSubSegmentAt(i).toString();

      try {

        // create a fresh XRD

        XRD xrd = new XRD();

        // using the parent authority and subsegment name, find the subsegment and the authority we are describing now
        // we must be prepared to have null values here, since not all pipeline configurations
        // may use objects from the store

        SubSegment subSegment = null;
        Authority authority = null;

        if (parentAuthority != null) subSegment = this.store.findSubSegment(parentAuthority, subSegmentName);
        if (subSegment != null) authority = this.store.getSubSegmentAuthority(subSegment);

        // give subclasses a chance to init the XRD
View Full Code Here

Examples of org.openxri.store.Authority

        XRD xrd = new XRD();

        // get the current authority from the list

        Authority authority = authorities[i];

        // give subclasses a chance to init the XRD

        ret = this.initXRD(
            xrd,
View Full Code Here

Examples of org.springside.examples.miniweb.entity.account.Authority

  }

  public static Authority getRandomAuthority() {
    String authName = DataUtils.randomName("Authority");

    Authority authority = new Authority();
    authority.setName(authName);

    return authority;
  }
View Full Code Here

Examples of se.inera.ifv.casebox.core.entity.Authority

            log.error("Username {} already exist, can not create user.", new Object[] {username});
            throw new CaseboxException("error.user.alreadyexist");
        }
       
        user = new User(username, password, true, firstName, lastName);
        Authority authority = new Authority(user, AuthorityRole.ROLE_USER);
        user.getAuthorities().add(authority);
       
        log.debug("Create user {}.", new Object[]{user});
        user = userRepository.store(user);
View Full Code Here

Examples of vn.pyco.tinycms.model.Authority

    /*
     * @see vn.pyco.tinycms.dao.AuthorityDao#getByName(java.lang.String)
     */
    @Override
    public Authority getByName(String authority) {
        Authority result = null;
        try {
            Criteria criteria = createCriteria();
            criteria.add(Restrictions.eq(Authority.PROP_AUTHORITY, authority));
            result = (Authority) findUniqueByCriteria(criteria);
           
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.