com.bstek.dorado.view.loader.Package.java Source code

Java tutorial

Introduction

Here is the source code for com.bstek.dorado.view.loader.Package.java

Source

/*
 * This file is part of Dorado 7.x (http://dorado7.bsdn.org).
 * 
 * Copyright (c) 2002-2012 BSTEK Corp. All rights reserved.
 * 
 * This file is dual-licensed under the AGPLv3 (http://www.gnu.org/licenses/agpl-3.0.html) 
 * and BSDN commercial (http://www.bsdn.org/licenses) licenses.
 * 
 * If you are unsure which license is appropriate for your use, please contact the sales department
 * at http://www.bstek.com/contact.
 */

package com.bstek.dorado.view.loader;

import java.util.LinkedHashSet;
import java.util.Set;

import org.apache.commons.lang.StringUtils;

/**
 * ???
 * 
 * @author Benny Bao (mailto:benny.bao@bstek.com)
 * @since Sep 24, 2008
 */
public class Package {
    private String name;
    private String[] fileNames;
    private String pattern;
    private String contentType;
    private String charset;
    private Set<String> depends = new LinkedHashSet<String>();
    private Set<String> dependedBy = new LinkedHashSet<String>();
    private String baseUri;
    private boolean mergeRequests = true;
    private boolean cacheable = true;
    private int clientType;

    /**
     * @param name
     *            ???
     */
    public Package(String name) {
        this.name = name;
    }

    /**
     * ???
     */
    public String getName() {
        return name;
    }

    /**
     * pattern????pattern
     */
    public String getPattern() {
        return pattern;
    }

    /**
     * pattern??
     */
    public void setPattern(String pattern) {
        this.pattern = pattern;
    }

    /**
     * ContentType
     */
    public String getContentType() {
        return contentType;
    }

    /**
     * ContentType?
     * <ul>
     * <li>text/javascrip</li>
     * <li>text/css</li>
     * </ul>
     */
    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    /**
     * 
     */
    public String getCharset() {
        return charset;
    }

    /**
     * 
     */
    public void setCharset(String charset) {
        this.charset = charset;
    }

    /**
     * ?????????
     */
    public Set<String> getDepends() {
        return depends;
    }

    public Set<String> getDependedBy() {
        return dependedBy;
    }

    /**
     * ??
     */
    public String[] getFileNames() {
        return fileNames;
    }

    /**
     * ?????ContentType
     */
    public void setFileNames(String[] fileNames) {
        for (int i = 0; i < fileNames.length; i++) {
            String fileName = fileNames[i];
            if (fileName != null) {
                fileNames[i] = StringUtils.trim(fileName);
            }
        }
        this.fileNames = fileNames;
    }

    public String getBaseUri() {
        return baseUri;
    }

    public void setBaseUri(String baseUri) {
        this.baseUri = baseUri;
    }

    public boolean isMergeRequests() {
        return mergeRequests;
    }

    public void setMergeRequests(boolean mergeRequests) {
        this.mergeRequests = mergeRequests;
    }

    public boolean isCacheable() {
        return cacheable;
    }

    public void setCacheable(boolean cacheable) {
        this.cacheable = cacheable;
    }

    public int getClientType() {
        return clientType;
    }

    public void setClientType(int clientType) {
        this.clientType = clientType;
    }
}