Examples of Cartridge


Examples of org.apache.stratos.manager.dto.Cartridge

    }
  }

  public void info(String alias) throws CommandException {
    try {
            Cartridge cartridge = null;
            try {
                cartridge = stub.getCartridgeInfo(alias);
            } catch (ApplicationManagementServiceADCExceptionException e) {
              handleException(e);
                return;
            } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
              handleException("notsubscribed.error", e, alias);
      }
      if (logger.isDebugEnabled()) {
        logger.debug("Cartridge Info: {}", new Gson().toJson(cartridge));
      }
      final String FORMAT = "%-20s: %s%n";
      System.out.println();
      System.out.println("Cartridge Information");
      System.out.println("---------------------");
      System.out.format(FORMAT, "Cartridge", cartridge.getCartridgeType());
      System.out.format(FORMAT, "Name", cartridge.getDisplayName());
      System.out.format(FORMAT, "Description", cartridge.getDescription());
      System.out.format(FORMAT, "Version", cartridge.getVersion());
      System.out.format(FORMAT, "Tenancy Model", cartridge.getMultiTenant() ? "Multi-Tenant" : "Single-Tenant");
      System.out.format(FORMAT, "Alias", cartridge.getCartridgeAlias());
      if (StringUtils.isNotBlank(cartridge.getPolicyDescription())) {
        System.out.format(FORMAT, "Policy", cartridge.getPolicyDescription());
      }
      System.out.format(FORMAT, "Access URL(s)", getAccessURLs(cartridge));
      if (StringUtils.isNotBlank(cartridge.getIp())) {
        System.out.format(FORMAT, "Host", cartridge.getIp());
      }
      if (StringUtils.isNotBlank(cartridge.getDbUserName())) {
        System.out.format(FORMAT, "Database Username", cartridge.getDbUserName());
      }
      if (StringUtils.isNotBlank(cartridge.getPassword())) {
        System.out.format(FORMAT, "Password", cartridge.getPassword());
      }
      if (StringUtils.isNotBlank(cartridge.getRepoURL())) {
        System.out.format(FORMAT, "Repository URL", cartridge.getRepoURL());
      }
      System.out.format(FORMAT, "Status", cartridge.getStatus());
      System.out.format(FORMAT, "Running Instances",
          cartridge.getMultiTenant() ? "N/A" : String.valueOf(cartridge.getActiveInstances()));
      System.out.println();

        } catch (RemoteException e) {
          handleException(e);
        }
View Full Code Here

Examples of org.javatari.atari.cartridge.Cartridge

  }
 
  public void morphToStandaloneMode() {
    if (isStandaloneMode()) return;
    powerOff();
    Cartridge lastCartridge = isClientMode() ? cartridgeProvided : currentConsole.cartridgeSocket().inserted();
    if (standaloneConsole == null) buildAndPlugStandaloneConsole();
    else plugConsole(standaloneConsole);
    adjustPeripheralsToStandaloneOrServerOperation();
    currentConsole.cartridgeSocket().insert(lastCartridge, false);
    powerOn();
View Full Code Here

Examples of org.javatari.atari.cartridge.Cartridge

  }

  public void morphToServerMode() {
    if (isServerMode()) return;
    powerOff();
    Cartridge lastCartridge = isClientMode() ? cartridgeProvided : currentConsole.cartridgeSocket().inserted();
    if (serverConsole == null) buildAndPlugServerConsole();
    else plugConsole(serverConsole);
    adjustPeripheralsToStandaloneOrServerOperation();
    currentConsole.cartridgeSocket().insert(lastCartridge, false);
    powerOn();
View Full Code Here

Examples of org.javatari.atari.cartridge.Cartridge

    }
    @Override
    public boolean importData(TransferSupport support) {
      if (!canImport(support)) return false;
      monitor.showOSD("LOADING CARTRIDGE...", true);
      Cartridge cart = ROMTransferHandlerUtil.importCartridgeData(support.getTransferable());
      monitor.showOSD(null, true);
      if (cart == null) return false;
      // LINK Action means load Cartridge without auto power! :-)
      boolean autoPower = !support.isDrop() || support.getDropAction() != LINK;
      monitor.cartridgeInsert(cart, autoPower);
View Full Code Here

Examples of org.javatari.atari.cartridge.Cartridge

  }

  private void loadCartridgeFromFile(boolean autoPower) {
    if (cartridgeChangeDisabledWarning()) return;
    display.displayLeaveFullscreen();
    Cartridge cart = null;
    try {
      File file = FileROMChooser.chooseFileToLoad();
      if (file != null) cart = ROMLoader.load(file);
    } catch (AccessControlException e) {
      // Automatically tries FileServiceChooser if access is denied
View Full Code Here

Examples of org.javatari.atari.cartridge.Cartridge

  }

  private void loadCartridgeFromURL(boolean autoPower) {
    if (cartridgeChangeDisabledWarning()) return;
    display.displayLeaveFullscreen();
    Cartridge cart = null;
    String url = URLROMChooser.chooseURLToLoad();
    if (url != null) cart = ROMLoader.load(url, false);
    if (cart != null) cartridgeInsert(cart, autoPower);
    else display.displayRequestFocus();
  }
View Full Code Here

Examples of org.javatari.atari.cartridge.Cartridge

    if (cartridgeChangeDisabledWarning()) return;
    try {
      Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();
      Transferable transf = clip.getContents("Ignored");
      if (transf == null) return;
      Cartridge cart = ROMTransferHandlerUtil.importCartridgeData(transf);
      if (cart != null) cartridgeInsert(cart, true);
    } catch (Exception ex) {
      // Simply give up
    }
  }
View Full Code Here

Examples of org.javatari.atari.cartridge.Cartridge

    }
    @Override
    public boolean importData(TransferSupport support) {
      if (!canImport(support)) return false;
      monitorPanel.monitor().showOSD("LOADING CARTRIDGE...", true);
      Cartridge cart = ROMTransferHandlerUtil.importCartridgeData(support.getTransferable());
      monitorPanel.monitor().showOSD(null, true);
      if (cart == null) return false;
      // LINK Action means load Cartridge without auto power! :-)
      boolean autoPower = !support.isDrop() || support.getDropAction() != LINK;
      monitorPanel.monitor().cartridgeInsert(cart, autoPower);
View Full Code Here

Examples of org.javatari.atari.cartridge.Cartridge

    for (CartridgeFormatOption option : options)
      if (option.format.equals(cartridge().format())) currOption = option;
    int pos = options.indexOf(currOption) + 1;    // cycle through options
    if (pos >= options.size()) pos = 0;
    CartridgeFormatOption newOption = options.get(pos);
    Cartridge newCart = newOption.format.createCartridge(cartridge().rom());
    cartridgeSocket().insert(newCart, true);
    showOSD(newOption.format.toString(), true);
  }
View Full Code Here

Examples of org.javatari.atari.cartridge.Cartridge

      romNameTf.setText("<NO CARTRIDGE INSERTED>");
      romFormatLb.setListData(new Object[0]);
      romFormatLb.setEnabled(false);
      defaultsB.setVisible(false);
    } else {
      Cartridge cart = room.currentConsole().cartridgeSocket().inserted();
      romNameTf.setText(cart.rom().info.name);
      romNameTf.setCaretPosition(0);
      ArrayList<CartridgeFormat> formats = new ArrayList<CartridgeFormat>();
      try {
        ArrayList<CartridgeFormatOption> formatOptions;
        formatOptions = CartridgeDatabase.getFormatOptions(cart.rom());
        for (CartridgeFormatOption option : formatOptions)
          formats.add(option.format);
      } catch (ROMFormatUnsupportedException e) {
        // Leave formats empty
      }
      if (!formats.contains(cart.format())) formats.add(0, cart.format());
      romFormatLb.setListData(formats.toArray());
      romFormatLb.setSelectedValue(cart.format(), true);
      romFormatLb.setEnabled(!formats.isEmpty() && !room.isClientMode());
      defaultsB.setText("Auto Detect");
      defaultsB.setVisible(!room.isClientMode());
    }
    refreshInProgress = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.