Tabnine Logo
Username.getDisplayName
Code IndexAdd Tabnine to your IDE (free)

How to use
getDisplayName
method
in
com.thoughtworks.go.server.domain.Username

Best Java code snippets using com.thoughtworks.go.server.domain.Username.getDisplayName (Showing top 4 results out of 315)

origin: gocd/gocd

private void pausePipeline(String pipelineName, String pauseCause, Username pauseBy) {
  String mutexPipelineName = mutexForPausePipeline(pipelineName);
  synchronized (mutexPipelineName) {
    String sanitizedPauseCause = pauseCause.substring(0, Math.min(255, pauseCause.length()));
    String pauseByDisplayName = pauseBy.getDisplayName();
    String sanitizedPauseBy = pauseByDisplayName.substring(0, Math.min(255, pauseByDisplayName.length()));
    pipelineSqlMapDao.pause(pipelineName, sanitizedPauseCause, sanitizedPauseBy);
    LOGGER.info("[Pipeline Pause] Pipeline [{}] is paused by [{}] because [{}]", pipelineName, pauseBy, pauseCause);
    notifyListeners(PipelinePauseChangeListener.Event.pause(pipelineName, pauseBy));
  }
}
origin: gocd/gocd

public static BuildCause createManualForced(MaterialRevisions materialRevisions, Username username) {
  if (username == null) {
    throw new IllegalArgumentException("Username cannot be null");
  }
  String message = String.format("Forced by %s", username.getDisplayName());
  return new BuildCause(materialRevisions, BuildTrigger.forForced(message), CaseInsensitiveString.str(username.getUsername()));
}
origin: gocd/gocd

@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  Username userName = SessionUtils.currentUsername();
  String pipeline = pipeline(request);
  if (authorizedToViewPipeline(userName, pipeline)) {
    super.service(request, response);
    return;
  }
  response.sendError(SC_FORBIDDEN, String.format("%s is not authorized to view the pipeline %s", userName.getDisplayName(), pipeline));
}
origin: gocd/gocd

@Override
public boolean canContinue(CruiseConfig cruiseConfig) {
  if (!goConfigService.isAdministrator(username.getUsername())) {
    result.forbidden(LocalizedMessage.forbiddenToEditResource("environment", environmentConfig.name(), username.getDisplayName()), HealthStateType.forbidden());
    return false;
  }
  return true;
}
com.thoughtworks.go.server.domainUsernamegetDisplayName

Popular methods of Username

  • getUsername
  • <init>
  • equals
  • isAnonymous
  • valueOf
  • hashCode
  • isGoAgentUser

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now