Examples of RemoteResourceWrapper


Examples of org.w3c.jigadm.RemoteResourceWrapper

    }

    protected String [] getStringArray(RemoteResourceWrapper rrw,
               Properties p)
    {
  RemoteResourceWrapper w      = rrw;
  RemoteResource        rm     = w.getResource();
  RemoteResource        target = null;
  String                realm  = null;
  try {
      realm = (String)rm.getValue("realm");
  } catch (RemoteAccessException ex) {
      ex.printStackTrace();
  }
  if (realm == null)
      return new String[0];

  do {
      w = w.getFatherWrapper();
      if (w != null) {
    rm = w.getResource();
    try {
        if ((rm.getClassHierarchy())[0].equals
      ("org.w3c.jigsaw.http.ConfigResource"))
      target = rm.loadResource("realms");
    } catch (RemoteAccessException ex) {
View Full Code Here

Examples of org.w3c.jigadm.RemoteResourceWrapper

                   selected);
    } catch (RemoteAccessException ex) {
        // Add a fancy error
        return;
    }
    RemoteResourceWrapper nrrw;
    nrrw = new RemoteResourceWrapper(rrw, nrr, rrw.getBrowser());
    rrw.getBrowser().insertNode(rrw, nrrw, tf.getText());
      }
  }
    }
View Full Code Here

Examples of org.w3c.jigadm.RemoteResourceWrapper

      } catch (RemoteAccessException ex) {
    errorPopup("RemoteAccessException", ex);
    ex.printStackTrace();
      }
  }
  return new RemoteResourceWrapper(rw, resource, serverBrowser);
    }
View Full Code Here

Examples of org.w3c.jigadm.RemoteResourceWrapper

    public void notifyExpander(TreeBrowser browser, TreeNode nd) {
  boolean authorized = true;
  if(tl != null) {
      tl.focusChanged((RemoteResourceWrapper)nd.getItem());
  }
  RemoteResourceWrapper rrw = null;
  RemoteResource rr = null;
  rrw = (RemoteResourceWrapper)nd.getItem();
  if(rrw == null)
      return;
  rr = rrw.getResource();
  setCursor(Frame.WAIT_CURSOR);
  try {
      RemoteResource frames[] = rr.getFrames();
      if (frames != null) {
    if (debug)
        System.out.println("Found "+frames.length+" identifiers");
    for(int i = 0; i <frames.length; i++) {
        RemoteResourceWrapper frw =
      new RemoteResourceWrapper(rrw, frames[i], serverBrowser);
        browser.insert(nd, frw, this, getFrameName(frames[i]), frameicon);
    }
      }
  } catch (RemoteAccessException ex) {
      if( ex.getMessage().equals("Unauthorized")) {
View Full Code Here

Examples of org.w3c.jigadmin.RemoteResourceWrapper

     * Drop a resource.
     * @param cell The resource cell
     * @see org.w3c.jigadmin.editors.ResourceCell
     */
    protected boolean dropResource(ResourceCell cell) {
  RemoteResourceWrapper rrw = getSelectedResourceWrapper();
  PropertyManager pm = PropertyManager.getPropertyManager();
  try {
      if (! pm.isExtensible(rrw)) {
    return false;
      } else if ((cell.isFrame() || cell.isFilter()) &&
           (pm.isEditable(rrw))) {
    //popupresource
    popupResource(rrw);
    return true;
      } else if (((cell.isContainer() || cell.isResource()) &&
      (! rrw.getResource().isIndexersCatalog()))
           ||
           (rrw.getResource().isIndexersCatalog() &&
      cell.isIndexer())) {
    //must be droppped on a Container
    if (rrw.getResource().isContainer()) {
        //add the resource
        String identifier = getIdentifier(cell, rrw);
        if (identifier != null) {
      TreePath path = getSelectionPath();
      addResource(identifier, cell.toString(),
View Full Code Here

Examples of org.w3c.jigadmin.RemoteResourceWrapper

             RemoteResourceWrapper rrwf, TreePath fpath)
  throws RemoteAccessException
    {
  RemoteResource rc =
      rrwf.getResource().registerResource(identifier, classname);
  RemoteResourceWrapper nrrw =
      new RemoteResourceWrapper(rrwf, rc);
  RemoteResourceWrapperNode parent =
      (RemoteResourceWrapperNode)fpath.getLastPathComponent();
  RemoteResourceWrapperNode child =
      new RemoteResourceWrapperNode(parent, nrrw, identifier);
  ((DefaultTreeModel)getModel()).insertNodeInto(child, parent, 0);
View Full Code Here

Examples of org.w3c.jigadmin.RemoteResourceWrapper

     */
    protected void addResourceToSelectedContainer(String classname,
              String identifier)
  throws RemoteAccessException         
    {
  RemoteResourceWrapper rrw = getSelectedResourceWrapper();
  if (rrw == null)
      return;
  addResource(identifier, classname, rrw, getSelectionPath());
    }
View Full Code Here

Examples of org.w3c.jigadmin.RemoteResourceWrapper

    /**
     * Add a (new) resource to the container associated to the
     * selected node.
     */
    protected void addResourceToSelectedContainer() {
  RemoteResourceWrapper selected = getSelectedResourceWrapper();
  PropertyManager pm = PropertyManager.getPropertyManager();
  try {
      if (selected == null) {
    JOptionPane.showMessageDialog(this,
                "No Container selected",
                "Error",
                JOptionPane.ERROR_MESSAGE);
    return;
      } else if (! pm.isExtensible(selected)) {
    JOptionPane.showMessageDialog(this,
                "The resource selected is not "+
                "extensible.",
                "Error",
                JOptionPane.ERROR_MESSAGE);
      }else if (selected.getResource().isContainer()) {
    Thread thread = new Thread() {
        public void run() {
      performAddResourceToSelectedContainer();
        }
    };
View Full Code Here

Examples of org.w3c.jigadmin.RemoteResourceWrapper

                "Reindex selected resource(s)?",
                "Reindex Resource(s)",
                JOptionPane.YES_NO_OPTION);
      if (result == JOptionPane.YES_OPTION) {
    for (int i = 0 ; i < path.length ; i++) {
        RemoteResourceWrapper rrw =
      getSelectedResourceWrapper(path[i]);
        if (rrw == null)
      continue;
        try {
      reindexResource(rrw, rec);
View Full Code Here

Examples of org.w3c.jigadmin.RemoteResourceWrapper

                "Delete Resource(s)",
                JOptionPane.YES_NO_OPTION);
      if (result == JOptionPane.YES_OPTION) {
    DefaultTreeModel model = (DefaultTreeModel) getModel();
    for (int i = 0 ; i < path.length ; i++) {
        RemoteResourceWrapper rrw =
      getSelectedResourceWrapper(path[i]);
        if (rrw == null)
      continue;
        try {
      if (pm.isEditable(rrw)) {
          deleteResource(rrw);
          MutableTreeNode node = (MutableTreeNode)
        path[i].getLastPathComponent();
          model.removeNodeFromParent(node);
      } else {
          String name = (String)
        rrw.getResource().getValue("identifier");
          Message.showInformationMessage(this, name+
                 " is not editable");
      }
        } catch (RemoteAccessException ex) {
      Message.showErrorMessage(this, ex);
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.