Ejemplo n.º 1
0
 @Override
 public void performAction(SiteNode sn) throws Exception {
   Session session = Model.getSingleton().getSession();
   String url = new URI(sn.getHierarchicNodeName(), false).toString();
   if (sn.isLeaf()) {
     url = Pattern.quote(url);
   } else {
     url = Pattern.quote(url + "/") + ".*";
   }
   session.getExcludeFromSpiderRegexs().add(url);
 }
Ejemplo n.º 2
0
 @Override
 public boolean isEnableForComponent(Component invoker) {
   treeSite = getTree(invoker);
   if (treeSite != null) {
     SiteNode node = (SiteNode) treeSite.getLastSelectedPathComponent();
     if (node != null && !node.isRoot()) {
       this.setEnabled(true);
     } else {
       this.setEnabled(false);
     }
     return true;
   }
   return false;
 }
Ejemplo n.º 3
0
 @Override
 public boolean isEnableForComponent(Component invoker) {
   contextId = -1;
   if (invoker instanceof JTree
       && SiteMapPanel.CONTEXT_TREE_COMPONENT_NAME.equals(invoker.getName())) {
     JTree contextTree = (JTree) invoker;
     SiteNode node = (SiteNode) contextTree.getLastSelectedPathComponent();
     if (node == null || node.isRoot()) {
       return false;
     }
     contextId = ((Target) node.getUserObject()).getContext().getIndex();
     return isEnabledForContext(contextId);
   }
   return false;
 }
Ejemplo n.º 4
0
 @Override
 public StructuralNode getParent() throws DatabaseException {
   if (parent == null && !this.isRoot()) {
     parent = new StructuralSiteNode((SiteNode) node.getParent());
   }
   return parent;
 }
 @Override
 public void performAction(SiteNode sn) {
   try {
     performAction(sn.getNodeName(), new StructuralSiteNode(sn).getRegexPattern());
   } catch (DatabaseException e) {
     // Ignore
   }
 }
Ejemplo n.º 6
0
  private void deleteHistory(HistoryReference ref) {

    if (ref == null) {
      return;
    }
    extension.removeFromHistoryList(ref);

    SiteNode node = ref.getSiteNode();
    if (node == null) {
      return;
    }

    Session session = Model.getSingleton().getSession();
    SiteMap map = session.getSiteTree();

    if (node.getHistoryReference() == ref) {
      // same active Node
      PopupDeleteMenu.delete(map, node);
    } else {
      node.getPastHistoryReference().remove(ref);
    }
  }