Tabnine Logo
HostTemplate.getAccountId
Code IndexAdd Tabnine to your IDE (free)

How to use
getAccountId
method
in
io.cattle.platform.core.model.HostTemplate

Best Java code snippets using io.cattle.platform.core.model.HostTemplate.getAccountId (Showing top 3 results out of 315)

origin: rancher/cattle

@Override
public HandlerResult handle(ProcessState state, ProcessInstance process) {
  HostTemplate template = (HostTemplate)state.getResource();
  String value = DataAccessor.fieldString(template, HostTemplateConstants.FIELD_SECRET_VALUES);
  try {
    secretsService.delete(template.getAccountId(), value);
  } catch (IOException e) {
    log.error("Failed to delete secret from storage for machine driver credential [{}]",
        template.getId(), e);
  }
  return null;
}
origin: rancher/cattle

@Override
public Object link(String name, Object obj, ApiRequest request) throws IOException {
  if (!(obj instanceof HostTemplate)) {
    return null;
  }
  HostTemplate ht = (HostTemplate)obj;
  Schema s = request.getSchemaFactory().getSchema(HostTemplate.class);
  if (!s.getResourceFields().get(HostTemplateConstants.FIELD_SECRET_VALUES).isReadOnCreateOnly()) {
    String secrets = DataAccessor.fieldString(obj, HostTemplateConstants.FIELD_SECRET_VALUES);
    if (secrets != null) {
      try {
        secrets = secretService.decrypt(ht.getAccountId(), secrets);
        request.setResponseContentType("application/json");
        request.setResponseObject(new Object());
        IOUtils.write(Base64.decodeBase64(secrets), request.getOutputStream());
        return new Object();
      } catch (Exception e) {
        throw new IOException(e);
      }
    }
  }
  return null;
}
origin: rancher/cattle

/**
 * {@inheritDoc}
 */
@Override
public void from(io.cattle.platform.core.model.HostTemplate from) {
  setId(from.getId());
  setName(from.getName());
  setAccountId(from.getAccountId());
  setKind(from.getKind());
  setUuid(from.getUuid());
  setDescription(from.getDescription());
  setState(from.getState());
  setCreated(from.getCreated());
  setRemoved(from.getRemoved());
  setRemoveTime(from.getRemoveTime());
  setData(from.getData());
  setDriver(from.getDriver());
  setFlavorPrefix(from.getFlavorPrefix());
}
io.cattle.platform.core.modelHostTemplategetAccountId

Javadoc

Getter for cattle.host_template.account_id.

Popular methods of HostTemplate

  • getDriver
    Getter for cattle.host_template.driver.
  • getId
    Getter for cattle.host_template.id.
  • from
    Load data from another generated Record/POJO implementing the common interface HostTemplate
  • getCreated
    Getter for cattle.host_template.created.
  • getData
    Getter for cattle.host_template.data.
  • getDescription
    Getter for cattle.host_template.description.
  • getFlavorPrefix
    Getter for cattle.host_template.flavor_prefix.
  • getKind
    Getter for cattle.host_template.kind.
  • getName
    Getter for cattle.host_template.name.
  • getRemoveTime
    Getter for cattle.host_template.remove_time.
  • getRemoved
    Getter for cattle.host_template.removed.
  • getState
    Getter for cattle.host_template.state.
  • getRemoved,
  • getState,
  • getUuid

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for WebStorm
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