Codota Logo
HostTemplate
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: rancher/cattle

/**
 * {@inheritDoc}
 */
@Override
public <E extends io.cattle.platform.core.model.HostTemplate> E into(E into) {
  into.from(this);
  return into;
}
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());
}
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

public String getDriverFromHostTemplate(Host host) {
  Long hostTemplateId = host.getHostTemplateId();
  if (hostTemplateId != null) {
    HostTemplate ht = objectManager.loadResource(HostTemplate.class, hostTemplateId);
    return ht.getDriver();
  }
  return null;
}
io.cattle.platform.core.modelHostTemplate

Javadoc

This class is generated by jOOQ.

Most used methods

  • getAccountId
    Getter for cattle.host_template.account_id.
  • 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.
  • getRemoveTime,
  • getRemoved,
  • getState,
  • getUuid

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now