Add a collaborator to an app.
@param appName App name. See {@link #listApps} for a list of apps that can be used.
@param collaborator Username of the collaborator to add. This is usually in the form of "user@company.com".
517791
public void addCollaborator(String appName, String collaborator) {
        connection.execute(new SharingAdd(appName, collaborator), apiKey);
    }
763212
def add(self, email):
        
        if email not in self._collaborators:
            self._collaborators[email] = ShareRequestValue.Add
        self._dirty = True
884347
public void setAppIds(java.util.Collection<String> appIds) {
        if (appIds == null) {
            this.appIds = null;
            return;
        }

        this.appIds = new java.util.ArrayList<String>(appIds);
    }
1360302
private void addObject() {
        SharedPreferences prefs = loadSharedPreferences("objectList");

        List<String> objects = getObjectList();
        objects.add(getId());
        
        prefs.edit().putString("list", StringUtils.join(objects, ",")).commit();
    }
777840
public void addPerson( String name )
    {
        try ( Session session = driver.session() )
        {
            session.run( "CREATE (a:Person {name: $name})", parameters( "name", name ) );
        }
    }
866848
@SuppressWarnings("unused")
  public void setAppInfo(String name, String version) {
    if (name == null || version == null) {
      // nothing to do
      return;
    }

    this.userAgent = DEFAULT_USER_AGENT + " " + name.trim() + "/" + version.trim();
  }
677848
public void addLabel(Label label)
    {
        // Add the label to any applications it is associated with
        List<Long> applicationIds = label.getLinks().getApplications();
        for(long applicationId : applicationIds)
        {
            Application application = applications.get(applicationId);
            if(application != null)
                labels(applicationId).add(label);
            else
                logger.severe(String.format("Unable to find application for label '%s': %d", label.getKey(), applicationId));
        }
    }
1279090
public void addApplication(App application)
    {
Utility.getLogger().info("addApp: " + application);
        m_vApplication.add(application);
        ((BaseApplication)application).setEnvironment(this);
        if ((m_applicationDefault == null)
                || ((!(m_applicationDefault instanceof MainApplication))) && (application instanceof MainApplication))
            this.setDefaultApplication(application);        // Initialization app
    }
1177208
def app_add_developers(app_name_or_id, alias=None, input_params={}, always_retry=True, **kwargs):
    
    fully_qualified_version = app_name_or_id + (('/' + alias) if alias else '')
    return DXHTTPRequest('/%s/addDevelopers' % fully_qualified_version, input_params, always_retry=always_retry, **kwargs)
857685
public CompletableFuture<Revision> addToken(Author author, String projectName,
                                                String appId, ProjectRole role) {
        requireNonNull(author, "author");
        requireNonNull(projectName, "projectName");
        requireNonNull(appId, "appId");
        requireNonNull(role, "role");

        return getTokens().thenCompose(tokens -> {
            final Token token = tokens.appIds().get(appId);
            checkArgument(token != null, "Token not found: " + appId);

            final TokenRegistration registration = new TokenRegistration(appId, role,
                                                                         UserAndTimestamp.of(author));
            final JsonPointer path = JsonPointer.compile("/tokens" + encodeSegment(registration.id()));
            final Change<JsonNode> change =
                    Change.ofJsonPatch(METADATA_JSON,
                                       asJsonArray(new TestAbsenceOperation(path),
                                                   new AddOperation(path, Jackson.valueToTree(registration))));
            final String commitSummary = "Add a token '" + registration.id() +
                                         "' to the project " + projectName + " with a role '" + role + '\'';
            return metadataRepo.push(projectName, Project.REPO_DOGMA, author, commitSummary, change);
        });
    }
750926
public ResponseWrapper addCrossFriends(String username, CrossFriendPayload payload)
            throws APIConnectionException, APIRequestException {
        StringUtils.checkUsername(username);
        Preconditions.checkArgument(null != payload, "CrossFriendPayload should not be null");
        return _httpClient.sendPost(_baseUrl + crossUserPath + "/" + username + "/friends", payload.toString());
    }
266182
public synchronized void setUserAgent(String applicationName,
            String applicationVersion, String programmingLanguage,
            String... additionalNameValuePairs) {
        checkUpdatable();
        StringBuilder b = new StringBuilder();
        b.append(applicationName);
        b.append("/");
        b.append(applicationVersion);
        b.append(" (Language=");
        b.append(programmingLanguage);
        int i = 0;
        while (i < additionalNameValuePairs.length) {
            String name = additionalNameValuePairs[i];
            String value = additionalNameValuePairs[i + 1];
            b.append("; ");
            b.append(name);
            b.append("=");
            b.append(value);
            i += 2;
        }
        b.append(")");
        this.userAgent = b.toString();
    }
271904
public BoxCollaboration.Info collaborate(BoxCollaborator collaborator, BoxCollaboration.Role role) {
        JsonObject accessibleByField = new JsonObject();
        accessibleByField.add("id", collaborator.getID());

        if (collaborator instanceof BoxUser) {
            accessibleByField.add("type", "user");
        } else if (collaborator instanceof BoxGroup) {
            accessibleByField.add("type", "group");
        } else {
            throw new IllegalArgumentException("The given collaborator is of an unknown type.");
        }

        return this.collaborate(accessibleByField, role, null, null);
    }
751851
public static void addJob(String jobName, String jobClassName) throws SundialSchedulerException {

    addJob(jobName, jobClassName, null, false);
  }
251295
@Override
  public void _Network_Peers_addPeer(String name, boolean attemptConnect, int rating, String realm) throws MBeanException {
    try {
      NetworkImpl n = (NetworkImpl) stack.unwrap(Network.class);
      /*Peer p =*/ n.addPeer(name, realm, attemptConnect);
    }
    catch (IllegalArgumentException e) {
      logger.warn(e.getMessage());
    }
    catch (InternalException e) {
      throw new MBeanException(e, "Failed to add peer with name '" + name + "'");
    }
  }
723541
public static base_response add(nitro_service client, appqoeaction resource) throws Exception {
		appqoeaction addresource = new appqoeaction();
		addresource.name = resource.name;
		addresource.priority = resource.priority;
		addresource.respondwith = resource.respondwith;
		addresource.customfile = resource.customfile;
		addresource.altcontentsvcname = resource.altcontentsvcname;
		addresource.altcontentpath = resource.altcontentpath;
		addresource.polqdepth = resource.polqdepth;
		addresource.priqdepth = resource.priqdepth;
		addresource.maxconn = resource.maxconn;
		addresource.delay = resource.delay;
		addresource.dostrigexpression = resource.dostrigexpression;
		addresource.dosaction = resource.dosaction;
		return addresource.add_resource(client);
	}
311960
private void addAppConfigurations(Collection<I_CmsWorkplaceAppConfiguration> appConfigs) {

        for (I_CmsWorkplaceAppConfiguration appConfig : appConfigs) {
            I_CmsWorkplaceAppConfiguration old = m_appsById.get(appConfig.getId());
            if ((old == null) || (old.getPriority() < appConfig.getPriority())) {
                m_appsById.put(appConfig.getId(), appConfig);
            }
        }
    }