Examples of addAttribute()


Examples of org.osgi.impl.bundle.obr.resource.Tag.addAttribute()

   * @param collected The output zip file
   * @throws java.io.IOException
   */
  static Tag doIndex(Collection resources) throws IOException {
    Tag repository = new Tag("repository");
    repository.addAttribute("lastmodified", new Date());
    repository.addAttribute("name", name);

    for (Iterator i = resources.iterator(); i.hasNext();) {
      ResourceImpl resource = (ResourceImpl) i.next();
      repository.addContent(resource.toXML());

Examples of org.osgi.service.indexer.Builder.addAttribute()

      }
    }

    Builder builder = new Builder().setNamespace(Namespaces.NS_IDENTITY).addAttribute(Namespaces.NS_IDENTITY, name).addAttribute(Namespaces.ATTR_IDENTITY_TYPE, "file");
    if (version != null)
      builder.addAttribute(Namespaces.ATTR_VERSION, version);
    caps.add(builder.buildCapability());
  }

  private void doPlainFileContent(Resource resource, List<? super Capability> capabilities) throws Exception {

Examples of org.osgi.service.indexer.impl.util.Tag.addAttribute()

    Tag repoTag = new Tag(Schema.ELEM_REPOSITORY);
   
    String repoName = config.get(REPOSITORY_NAME);
    if (repoName == null)
      repoName = REPOSITORYNAME_DEFAULT;
    repoTag.addAttribute(Schema.ATTR_NAME, repoName);
   
    String increment = config.get(REPOSITORY_INCREMENT_OVERRIDE);
    if (increment == null)
      increment = Long.toString(System.currentTimeMillis());
    repoTag.addAttribute(Schema.ATTR_INCREMENT, increment);

Examples of org.pac4j.gae.profile.GaeUserServiceProfile.addAttribute()

  protected GaeUserServiceProfile retrieveUserProfile(GaeUserCredentials credentials, WebContext context) {
    User user = credentials.getUser();
    if (user != null) {
      GaeUserServiceProfile gaeUserProfile = new GaeUserServiceProfile();
      gaeUserProfile.setId(user.getEmail());
      gaeUserProfile.addAttribute(GaeUserServiceAttributesDefinition.EMAIL, user.getEmail());
      gaeUserProfile.addAttribute(GaeUserServiceAttributesDefinition.DISPLAYNAME, user.getNickname());
      if (service.isUserAdmin()) {
        gaeUserProfile.addRole(GaeUserServiceProfile.PAC4J_GAE_GLOBAL_ADMIN_ROLE);
      }
      return gaeUserProfile;

Examples of org.pac4j.oauth.profile.bitbucket.BitbucketProfile.addAttribute()

        JsonNode json = JsonHelper.getFirstNode(body);
        if (json != null) {
            json = (JsonNode) JsonHelper.get(json, "user");
            if (json != null) {
                for (final String attribute : OAuthAttributesDefinitions.bitbucketDefinition.getAllAttributes()) {
                   profile.addAttribute(attribute, JsonHelper.get(json, attribute));
                }
            }
        }
       return profile;
    }

Examples of org.pac4j.oauth.profile.casoauthwrapper.CasOAuthWrapperProfile.addAttribute()

            if (json != null) {
                final Iterator<JsonNode> nodes = json.iterator();
                while (nodes.hasNext()) {
                    json = nodes.next();
                    final String attribute = json.fieldNames().next();
                    userProfile.addAttribute(attribute, JsonHelper.get(json, attribute));
                }
            }
        }
        return userProfile;
    }

Examples of org.pac4j.oauth.profile.dropbox.DropBoxProfile.addAttribute()

        final DropBoxProfile profile = new DropBoxProfile();
        JsonNode json = JsonHelper.getFirstNode(body);
        if (json != null) {
            profile.setId(JsonHelper.get(json, "uid"));
            for (final String attribute : OAuthAttributesDefinitions.dropBoxDefinition.getPrincipalAttributes()) {
                profile.addAttribute(attribute, JsonHelper.get(json, attribute));
            }
            json = (JsonNode) JsonHelper.get(json, "quota_info");
            if (json != null) {
                for (final String attribute : OAuthAttributesDefinitions.dropBoxDefinition.getOtherAttributes()) {
                    profile.addAttribute(attribute, JsonHelper.get(json, attribute));

Examples of org.pac4j.oauth.profile.facebook.FacebookProfile.addAttribute()

        final FacebookProfile profile = new FacebookProfile();
        final JsonNode json = JsonHelper.getFirstNode(body);
        if (json != null) {
            profile.setId(JsonHelper.get(json, "id"));
            for (final String attribute : OAuthAttributesDefinitions.facebookDefinition.getAllAttributes()) {
                profile.addAttribute(attribute, JsonHelper.get(json, attribute));
            }
            extractData(profile, json, FacebookAttributesDefinition.FRIENDS);
            extractData(profile, json, FacebookAttributesDefinition.MOVIES);
            extractData(profile, json, FacebookAttributesDefinition.MUSIC);
            extractData(profile, json, FacebookAttributesDefinition.BOOKS);

Examples of org.pac4j.oauth.profile.foursquare.FoursquareProfile.addAttribute()

        JsonNode user = (JsonNode) JsonHelper.get(response, "user");
        if (user != null) {
            profile.setId(JsonHelper.get(user, "id"));

            for (final String attribute : OAuthAttributesDefinitions.foursquareDefinition.getAllAttributes()) {
                profile.addAttribute(attribute, JsonHelper.get(user, attribute));
            }
        }
        return profile;
    }

Examples of org.pac4j.oauth.profile.github.GitHubProfile.addAttribute()

        final GitHubProfile profile = new GitHubProfile();
        final JsonNode json = JsonHelper.getFirstNode(body);
        if (json != null) {
            profile.setId(JsonHelper.get(json, "id"));
            for (final String attribute : OAuthAttributesDefinitions.githubDefinition.getAllAttributes()) {
                profile.addAttribute(attribute, JsonHelper.get(json, attribute));
            }
        }
        return profile;
    }
   
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.