protected PanelInstanceNode getNewInstanceNode(PanelInstance instance) {
   PanelInstanceNode instanceNode = CDIBeanLocator.getBeanByType(PanelInstanceNode.class);
   instanceNode.setWorkspaceId(instance.getWorkspace().getId());
   instanceNode.setPanelInstanceId(instance.getInstanceId());
   instanceNode.setParent(this);
   instanceNode.setTree(getTree());
   return instanceNode;
 }
  private List getPanels() {
    List panels = new ArrayList();
    UserStatus userStatus = getUserStatus();
    if (instance != null) {
      PanelInstance[] instances = instance.getWorkspace().getPanelInstances();
      for (int i = 0; i < instances.length; i++) {
        if (panelProvider.isAssignableFrom(instances[i].getProvider().getDriver().getClass())) {
          PanelPermission viewPerm =
              PanelPermission.newInstance(instances[i], PanelPermission.ACTION_VIEW);
          if (userStatus.hasPermission(viewPerm)) panels.add(instances[i]);
        }
      }
    }

    return panels;
  }