Adds the specified {@link Token} to the specified {@code projectName}.
326039
public CompletableFuture<Revision> addToken(Author author, String projectName,
                                                Token token, ProjectRole role) {
        return addToken(author, projectName, requireNonNull(token, "token").appId(), role);
    }
363732
public static void initialize(String token) {
    if (token == null) {
      throw new IllegalArgumentException("Token should be defined.");
    }
    initialize(new ClientProperties(token, null, null));
  }
435920
@Patch("/metadata/{projectName}/tokens/{appId}")
    @Consumes("application/json-patch+json")
    public CompletableFuture<Revision> updateTokenRole(@Param("projectName") String projectName,
                                                       @Param("appId") String appId,
                                                       JsonPatch jsonPatch,
                                                       Author author) {
        final ReplaceOperation operation = ensureSingleReplaceOperation(jsonPatch, "/role");
        final ProjectRole role = ProjectRole.of(operation.value());
        return mds.findTokenByAppId(appId)
                  .thenCompose(token -> mds.updateTokenRole(author, projectName, token, role));
    }
965107
public Token add( Function function ) {
        Token t = new Token(function);
        push( t );
        return t;
    }
197956
@Override
    public Result addTokenToResult(Context context, String newToken, Result result) {
        if (isCached(context)) {
            LOGGER.debug("Not adding token to a cached result");
            return result;
        }

        LOGGER.debug("Adding token to result");
        if (getCookieName() != null) {
            Cookie cookie = context.cookie(getCookieName());
            if (cookie != null) {
                return result.with(Cookie.builder(cookie).setValue(newToken).build());
            } else {
                // Create a new cookie
                return result.with(Cookie.cookie(getCookieName(), newToken)
                        .setSecure(isSecureCookie())
                        .setPath(getCookiePath())
                        .setDomain(getCookieDomain())
                        .setMaxAge(3600)
                        .build());
            }
        } else {
            // Session
            context.session().put(getTokenName(), newToken);
            return result;
        }
    }
1334068
private void addTokens(List<AnalyzedToken> taggedTokens, List<AnalyzedToken> l) {
    if (taggedTokens != null) {
      for (AnalyzedToken at : taggedTokens) {
        l.add(at);
      }
    }
  }
952741
public void addValue(Token[] tokens) {
        if (type == null) {
            type = ItemType.LIST;
        }
        if (!isListableType()) {
            throw new IllegalArgumentException("The type of this item must be 'array', 'list' or 'set'");
        }
        if (tokensList == null) {
            tokensList = new ArrayList<>();
        }
        tokensList.add(tokens);
    }
952194
public void addMembership(Membership membership) throws RedmineException {
		final Project project = membership.getProject();
		if (project == null)
			throw new IllegalArgumentException("Project must be set");
		if (membership.getUser() == null)
			throw new IllegalArgumentException("User must be set");
		transport.addChildEntry(Project.class, getProjectKey(project),
				membership);
	}
841106
public IssueDto setProjectUuid(String s) {
    checkArgument(s.length() <= 50, "Value is too long for column ISSUES.PROJECT_UUID: %s", s);
    this.projectUuid = s;
    return this;
  }
1102925
public Integer addTokenAnnotation(String tokenString, String fileId, Integer sentId, Integer tokId, Integer positionCounter, JCas jcas){
		Token token = new Token(jcas);
		if (!((sentId == newTokSentNumber) && (tokId == newTokSentNumber))){
			if(USE_SPACES) // in chinese, there are no spaces, so the +1 correction is unnecessary
				positionCounter = positionCounter + 1;
		}
		token.setBegin(positionCounter);
		positionCounter = positionCounter + tokenString.length();
		token.setEnd(positionCounter);
		token.setTokenId(tokId);
		token.setSentId(sentId);
		token.setFilename(fileId);
		token.addToIndexes();
		
		String id = fileId+"_"+sentId+"_"+tokId;
		hmToken.put(id, token);
		
		return positionCounter;
  }
930203
private void addToken(final List<String> list, String tok) {
        if (StringUtils.isEmpty(tok)) {
            if (isIgnoreEmptyTokens()) {
                return;
            }
            if (isEmptyTokenAsNull()) {
                tok = null;
            }
        }
        list.add(tok);
    }
172651
public UpdateAuthorizerRequest withTokenSigningPublicKeys(java.util.Map<String, String> tokenSigningPublicKeys) {
        setTokenSigningPublicKeys(tokenSigningPublicKeys);
        return this;
    }
266234
final public void addPosition(int position) {
    if (tokenPosition == null) {
      tokenPosition = new MtasPosition(position);
    } else {
      tokenPosition.add(position);
    }
  }
969057
public ItemRequest<Project> addMembers(String project) {
    
        String path = String.format("/projects/%s/addMembers", project);
        return new ItemRequest<Project>(this, Project.class, path, "POST");
    }
820108
def add_account_to_project(self, account, project):
        
        username = account.username
        projectname = project.pid
        self._call([
            "gchproject",
            "--add-user", username,
            "-p", projectname],
            ignore_errors=[74])
602222
public boolean add(Token token,
                       Transaction transaction)
                    throws ObjectManagerException
    {
        addEntry(token, transaction);
        return true;
    }
448509
public void setTokenNameList(java.util.Collection<String> tokenNameList) {
        if (tokenNameList == null) {
            this.tokenNameList = null;
            return;
        }

        this.tokenNameList = new com.amazonaws.internal.SdkInternalList<String>(tokenNameList);
    }