⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jahiawebappspackage.java

📁 java 写的一个新闻发布系统
💻 JAVA
字号:
////                                   ____.//                       __/\ ______|    |__/\.     _______//            __   .____|    |       \   |    +----+       \//    _______|  /--|    |    |    -   \  _    |    :    -   \_________//   \\______: :---|    :    :           |    :    |         \________>//           |__\---\_____________:______:    :____|____:_____\//                                      /_____|////                 . . . i n   j a h i a   w e   t r u s t . . .////////  JahiaWebAppsPackage////  NK      16.01.2001////package org.jahia.data.webapps;import java.io.*;import java.util.*;/** * Holds Informations about a webapps package ( a war , ear or even an unziped directory * * * @author Khue ng * @version 1.0 */public class JahiaWebAppsPackage {   	/**   	 * A list of JahiaWebAppDef Object   	 * @associates JahiaWebAppDef   	 */   	private Vector m_WebApps = new Vector();   	/**   	 * The ContextRoot for all the web apps within the package   	 * in case of ear file, it's the application context   	 **/   	private String m_ContextRoot ;   	/** the file or directory name from which data are loaded **/   	private String m_FileName;   	/** the full path to the source file or directory **/   	private String m_FilePath;   	/** the package type **/   	private int m_Type ;	// 1=war, 2=ear, 3=directory	/** war package **/	private static final int WAR = 1;	/** ear package **/	private static final int EAR = 2;	/** directory **/	private static final int DIR = 3;	/** has EJB or not ? **/	private boolean m_HasEJB = false;   /**    * Constructor    *    * @param (String) contextRoot , the context root of the web apps    */	public JahiaWebAppsPackage ( String contextRoot ) {	   m_ContextRoot = contextRoot;	}   /**    * Get the WebApps List    *    * @return (Vector) the Vector of webapps list    */   public Vector getWebApps(){      return m_WebApps;   }   /**    * Set the WebApps List    *    * @param (Vector) the Vector of webapps list    */   public void addWebAppDef(Vector vec){      m_WebApps.addAll(vec);   }   /**    * Add a WebApps Definition in the Web Apps list    *    * @param (JahiaWebAppDef) webAppDef    */   public void addWebAppDef(JahiaWebAppDef webAppDef ){      m_WebApps.add(webAppDef);   }   /**    * Returns the Context Root of this package    *    * @return (String) the context root    */   public String getContextRoot(){      return m_ContextRoot;   }	/**	 * get the source filename	 *	 */    public String getFileName(){    	return this.m_FileName;    }	/**	 * set the source filename	 *	 */    public void setFileName(String name){    	this.m_FileName = name;		if ( name.endsWith(".war") ){			m_Type = WAR;		} else if ( name.endsWith(".ear") ){			m_Type = EAR;		} else  {			m_Type = DIR;		}    }	/**	 * get the file path	 *	 */    public String getFilePath(){    	return this.m_FilePath;    }	/**	 * set the file path	 *	 */    public void setFilePath(String path){    	this.m_FilePath = path;    }	/**	 * if the source is a war file	 *	 */    public boolean isWarFile(){        return (m_Type == WAR);    }	/**	 * if the source is an ear file	 *	 */    public boolean isEarFile(){        return ( m_Type == EAR );    }	/**	 * if the source is a directory	 *	 */    public boolean isDirectory(){        return ( m_Type == DIR );    }	/**	 * set has EJB or not	 */	public void setHasEJB(boolean val){		m_HasEJB = val;	}	/**	 * uses EJB or not ?	 * @return boolean has EJB or not	 */    public boolean hasEJB(){    	return m_HasEJB;    }} // end JahiaWebAppsPackage

⌨️ 快捷键说明

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