defaultnetworkplace.java

来自「这是linux下ssl vpn的实现程序」· Java 代码 · 共 105 行

JAVA
105
字号
package com.sslexplorer.vfs;

import java.util.Calendar;

import com.sslexplorer.policyframework.AbstractResource;
import com.sslexplorer.policyframework.PolicyConstants;
import com.sslexplorer.security.SessionInfo;
import com.sslexplorer.vfs.utils.URI;
import com.sslexplorer.vfs.utils.URI.MalformedURIException;

public class DefaultNetworkPlace extends AbstractResource implements NetworkPlace {
    // Private instance variables
    private String uri;
    private int type;
    private boolean readOnly;
    private boolean showHidden;
    private boolean allowResursive;
    private boolean noDelete;
    private String scheme;

    public DefaultNetworkPlace(int uniqueId, String scheme, String shortName, String description, String uri, int type, boolean readOnly,
                               boolean allowResursive, boolean noDelete, boolean showHidden, int parentResourcePermission,
                               Calendar dateCreated, Calendar dateAmended) throws MalformedURIException {
        super(PolicyConstants.NETWORK_PLACE_RESOURCE_TYPE, uniqueId, shortName, description, parentResourcePermission, dateCreated,
                        dateAmended);
        this.uri = uri;
        this.scheme = scheme;
        this.type = type;
        this.readOnly = readOnly;
        this.showHidden = showHidden;
        this.allowResursive = allowResursive;
        this.noDelete = noDelete;
    }
    
    public void replaceParameters(SessionInfo session) {
    	
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isAllowResursive() {
        return allowResursive;
    }

    public void setAllowResursive(boolean allowResursive) {
        this.allowResursive = allowResursive;
    }

    public boolean isNoDelete() {
        return noDelete;
    }

    public void setNoDelete(boolean noDelete) {
        this.noDelete = noDelete;
    }

    public boolean isReadOnly() {
        return readOnly;
    }

    public void setReadOnly(boolean readOnly) {
        this.readOnly = readOnly;
    }

    public boolean isShowHidden() {
        return showHidden;
    }

    public void setShowHidden(boolean showHidden) {
        this.showHidden = showHidden;
    }

    public String getScheme() {
        return scheme;
    }

    public void setScheme(String scheme) {
        this.scheme = scheme;
    }

    public boolean paramsRequirePassword() {
        if (uri.contains("${session:password}")){
            return true;
        }
        else{
            return false;
        }
    }
    
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?