Tabnine Logo
StringIDGenerator
Code IndexAdd Tabnine to your IDE (free)

How to use
StringIDGenerator
in
ca.nrc.cadc.uws.server

Best Java code snippets using ca.nrc.cadc.uws.server.StringIDGenerator (Showing top 3 results out of 315)

origin: org.opencadc/caom2-search-lib

/**
 * Generate a new filename for upload to TAP.
 *
 * @return String filename.
 */
@Override
public String generate()
{
  final StringBuilder filenameStringBuilder = new StringBuilder();
  if (StringUtil.hasText(getPrefix()))
  {
    filenameStringBuilder.append(getPrefix());
  }
  filenameStringBuilder.append(RANDOM_ALPHA_GENERATOR.getID());
  if (StringUtil.hasText(getSuffix()))
  {
    filenameStringBuilder.append(getSuffix());
  }
  return filenameStringBuilder.toString();
}
origin: org.opencadc/cadc-uws-server

public Job put(Job job)
{
  expectNotNull("job", job);
  AccessControlContext acContext = AccessController.getContext();
  Subject caller = Subject.getSubject(acContext);
  String ownerID = null;
  if (caller != null)
    ownerID = identityManager.toOwnerString(caller);
  job.setOwnerID(ownerID);
  if (job.getID() == null)
    JobPersistenceUtil.assignID(job, idGenerator.getID());
  Job keep = JobPersistenceUtil.deepCopy(job);
  if (ownerID != null)
    keep.ownerSubject = caller;
  synchronized(jobs)
  {
    jobs.put(keep.getID(), keep);
  }
  return job;
}
origin: org.opencadc/cadc-uws-server

if (!update) // insert
  JobPersistenceUtil.assignID(job, idGenerator.getID());
  job.setCreationTime(new Date());
ca.nrc.cadc.uws.serverStringIDGenerator

Most used methods

  • getID
    Generate a new identifier.

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onRequestPermissionsResult (Fragment)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • BoxLayout (javax.swing)
  • JButton (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Best IntelliJ 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