Package com.adito.networkplaces.forms

Examples of com.adito.networkplaces.forms.FileSystemForm


    }

    public boolean isAvailable(int checkNavigationContext, SessionInfo info, HttpServletRequest request) {
      boolean available = super.isAvailable(checkNavigationContext, info, request);
      if(available && request.getAttribute("fileSystemForm") != null) {
        FileSystemForm fsf = (FileSystemForm)request.getAttribute("fileSystemForm");
        return fsf.getVFSResource() != null && !fsf.isViewOnly() && !fsf.getVFSResource().getMount().isReadOnly();
      }
      return available;
    }
View Full Code Here


    }

    public boolean isAvailable(int checkNavigationContext, SessionInfo info, HttpServletRequest request) {
      boolean available = super.isAvailable(checkNavigationContext, info, request);
      if(available && request.getAttribute("fileSystemForm") != null) {
        FileSystemForm fsf = (FileSystemForm)request.getAttribute("fileSystemForm");
        return fsf.getNetworkPlace() != null && !fsf.isViewOnly() && !fsf.getNetworkPlace().isNoDelete();
      }
      return available;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see javax.servlet.jsp.tagext.Tag#doStartTag()
     */
    public int doStartTag() {
        FileSystemForm fsf = (FileSystemForm) pageContext.getRequest().getAttribute("fileSystemForm");
        if (fsf.isViewOnly() || fsf.getVFSResource().getMount().isReadOnly() ||  fsf.getNetworkPlace().isNoDelete()) {
            return SKIP_BODY;
        } else {
            return EVAL_BODY_INCLUDE;
        }
    }
View Full Code Here

        // Look up the requested property value
        LaunchSession launchSession = (LaunchSession)TagUtils.getInstance().lookup(pageContext, name, property, scope);
       
       
      FileSystemForm fsf = (FileSystemForm) pageContext.getRequest().getAttribute("fileSystemForm");
        StringBuffer results = new StringBuffer();
        results.append("<div class=\"path\"><span>");
        StringTokenizer tok = new StringTokenizer(fsf.getPath(), "/");
       
        String currentPath = tok.nextToken(); // Important: skip the file store
        // we only remove the second entry if the first one is the store, else we are straight into the proper paths.
        if (currentPath.equals("fs")){
            currentPath = tok.nextToken(); // Important: skip the file store type
View Full Code Here

     * (non-Javadoc)
     *
     * @see javax.servlet.jsp.tagext.Tag#doStartTag()
     */
    public int doStartTag() {
        FileSystemForm fsf = (FileSystemForm) pageContext.getRequest().getAttribute("fileSystemForm");
        if (fsf.isViewOnly() || fsf.getVFSResource().getMount().isReadOnly() ||  fsf.getNetworkPlace().isNoDelete()) {
            return SKIP_BODY;
        } else {
            return EVAL_BODY_INCLUDE;
        }
    }
View Full Code Here

   */
  public ActionForward deleteSelected(ActionMapping mapping, ActionForm form, HttpServletRequest request,
                    HttpServletResponse response) throws Exception {
    if (log.isDebugEnabled())
      log.debug("Delete selected files.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      fwd = checkMount(res, mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      buildModel(res, fileSystemForm, request);
      Object[] uris = fileSystemForm.getSelectedFileNames();
      if (uris == null || uris.length < 1) {
        ActionMessages msgs = getErrors(request);
        msgs.add(Globals.ERROR_KEY, new ActionMessage("vfs.delete.select.error"));
        saveErrors(request, msgs);
        return mapping.getInputForward();
View Full Code Here

   */
  public ActionForward deleteFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
          throws Exception {
    if (log.isDebugEnabled())
      log.debug("Delete file.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      fwd = checkMount(res, mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      buildModel(res, fileSystemForm, request);
      String delPath = fileSystemForm.getPath() + "/" + fileSystemForm.getFileName();
      deleteSingleFile(request, response, delPath, fileSystemForm);
      return mapping.findForward("list");
    } catch (DAVAuthenticationRequiredException e) {
      AbstractHTTPAuthenticationModule.sendAuthorizationError(request, response, e.getHttpRealm());
      return null;
View Full Code Here

   */
  public ActionForward confirmDeleteFile(ActionMapping mapping, ActionForm form, HttpServletRequest request,
                      HttpServletResponse response) throws Exception {
    if (log.isDebugEnabled())
      log.debug("Delete file.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
View Full Code Here

   */
  public ActionForward cutFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
          throws Exception {
    if (log.isDebugEnabled())
      log.debug("Cut file.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
View Full Code Here

   */
  public ActionForward copyFile(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
          throws Exception {
    if (log.isDebugEnabled())
      log.debug("Copy file.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
View Full Code Here

TOP

Related Classes of com.adito.networkplaces.forms.FileSystemForm

Copyright © 2018 www.massapicom. 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.