Codota Logo
Region.getId
Code IndexAdd Codota to your IDE (free)

How to use
getId
method
in
io.cattle.platform.core.model.Region

Best Java code snippets using io.cattle.platform.core.model.Region.getId (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: rancher/cattle

  private void cleanupExternalLinks(Region region) {
    for (AccountLink link : objectManager.find(AccountLink.class, ACCOUNT_LINK.REMOVED, null, ACCOUNT_LINK.LINKED_REGION_ID, region.getId())) {
      if (!link.getState().equalsIgnoreCase(CommonStatesConstants.REMOVING)) {
        objectProcessManager.executeStandardProcess(StandardProcess.REMOVE, link, null);
      }
    }
  }
}
origin: rancher/cattle

@Override
public boolean isRegionsEmpty(Agent agent, Account account, Map<String, Long> externalLinks,  Map<String, ExternalProject> projects, 
    Map<Long, Region> regionsIds, Map<String, Region> regionNameToRegion) {
    List<Region> regions = objectManager.find(Region.class, REGION.REMOVED, (Object) null);
    for(Region region : regions) {
      regionsIds.put(region.getId(), region);
      regionNameToRegion.put(region.getName(), region);
    }
    
  getLinkedEnvironments(account.getId(), externalLinks, regionsIds, projects);
  boolean noExternalLinks = externalLinks.isEmpty();
  List<? extends ExternalCredential> existing = DataAccessor.fieldObjectList(agent, AccountConstants.FIELD_EXTERNAL_CREDENTIALS, ExternalCredential.class,
      jsonMapper);
  boolean noExternalCreds = existing.isEmpty();
  if (noExternalLinks && noExternalCreds) {
    return true;
  }
    
    return false;
}
origin: rancher/cattle

@Override
public void run() {
  List<Region> regions = objectManager.find(Region.class, REGION.REMOVED, new Condition(ConditionType.NULL));
  if (regions.size() == 0) {
    return;
  }
  Region localRegion = null;
  Map<Long, Region> regionMap = new HashMap<Long, Region>();
  for(Region region : regions) {
    regionMap.put(region.getId(), region);
    if(region.getLocal()) {
      localRegion = region;
    }
  }
  
  HashSet<String> existingLinks = new HashSet<String>();
  cleanLinks(regionMap, existingLinks, localRegion);
  
  cleanAgents(existingLinks);
      
  reconcileAccountLinks();
}
origin: rancher/cattle

    ACCOUNT_LINK.LINKED_REGION_ID, region.getId(), "linkedAccountUuid", externalProject.getUuid());
toUpdate.add(link);
} catch(Exception ex) {
origin: rancher/cattle

private void getLinkedEnvironments(long accountId, Map<String, Long> links, Map<Long, Region> regionsIds,
    Map<String, ExternalProject> externalProjects) {
  List<AccountLink> accountLinks = objectManager.find(AccountLink.class, ACCOUNT_LINK.ACCOUNT_ID,
      accountId, ACCOUNT_LINK.REMOVED, null, ACCOUNT_LINK.LINKED_REGION_ID, new Condition(ConditionType.NOTNULL));
  for (AccountLink link : accountLinks) {
      if (link.getState().equalsIgnoreCase(CommonStatesConstants.REMOVING)) {
        continue;
      }
      if(link.getState().equalsIgnoreCase(CommonStatesConstants.REMOVED)) {
        continue;
      }
    Region targetRegion = regionsIds.get(link.getLinkedRegionId());
    if (targetRegion == null) {
      continue;
    }
    String UUID = getUUID(targetRegion.getName(), link.getLinkedAccount());
    if (!externalProjects.containsKey(UUID)) {
      links.put(UUID, targetRegion.getId());
    }
  }
}
origin: rancher/cattle

/**
 * {@inheritDoc}
 */
@Override
public void from(io.cattle.platform.core.model.Region 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());
  setUrl(from.getUrl());
  setPublicValue(from.getPublicValue());
  setSecretValue(from.getSecretValue());
  setLocal(from.getLocal());
}
io.cattle.platform.core.modelRegiongetId

Javadoc

Getter for cattle.region.id.

Popular methods of Region

  • getName
    Getter for cattle.region.name.
  • getUrl
    Getter for cattle.region.url.
  • getLocal
    Getter for cattle.region.local.
  • getPublicValue
    Getter for cattle.region.public_value.
  • getSecretValue
    Getter for cattle.region.secret_value.
  • getState
    Getter for cattle.region.state.
  • from
    Load data from another generated Record/POJO implementing the common interface Region
  • getAccountId
    Getter for cattle.region.account_id.
  • getCreated
    Getter for cattle.region.created.
  • getData
    Getter for cattle.region.data.
  • getDescription
    Getter for cattle.region.description.
  • getKind
    Getter for cattle.region.kind.
  • getDescription,
  • getKind,
  • getRemoveTime,
  • getRemoved,
  • getUuid

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • orElseThrow (Optional)
  • findViewById (Activity)
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JFrame (javax.swing)
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