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

📄 jahiapagedefinitiontemp.java

📁 java 写的一个新闻发布系统
💻 JAVA
字号:
////                                   ____.//                       __/\ ______|    |__/\.     _______//            __   .____|    |       \   |    +----+       \//    _______|  /--|    |    |    -   \  _    |    :    -   \_________//   \\______: :---|    :    :           |    :    |         \________>//           |__\---\_____________:______:    :____|____:_____\//                                      /_____|////                 . . . i n   j a h i a   w e   t r u s t . . .////// 28.01.2002 NK added page def ACL//package org.jahia.services.pages;import java.util.*;import org.jahia.exceptions.JahiaException;import org.jahia.services.pages.JahiaPageTemplateDB;import org.jahia.services.acl.*;import org.jahia.registries.*;import org.jahia.utils.JahiaConsole;/** * Can be used to handle every page definition parameters without changing/creating * a real object in storage until the user really want to save it. * * @author Khue Nguyen */public class JahiaPageDefinitionTemp  {        private static final String CLASS_NAME = JahiaPageDefinitionTemp.class.getName();        private int     mID;    private int     mSiteID;    private String  mName;    private String  mSourcePath;         // JSP source path    private boolean mAvailable;          // Available or not for a user.    private String  mImage;	private boolean mIsDefault = false;	    //-------------------------------------------------------------------------    /** Default constructor.     *     * @param int 		ID          Unique identification number of the page definition ( dummy ).     * @param int 		jahiaID     Jahia site unique identification number     * @param String 	name        Name of the page definition.     * @param String 	sourcePath  Source path of the page definition     * @param boolean	isAvailable Not available to users if false     * @param String	image		A thumbnail     * @param boolean	isDefault	true if this template is the default template      */    public JahiaPageDefinitionTemp (	int ID, int siteID, String name,            							String sourcePath, boolean isAvailable,            							String image , boolean isDefault )    {        mID             = ID;        mSiteID         = siteID;        if (name == null) {            name = "";        }        mName = name;        if (sourcePath == null) {            sourcePath = "";        }        mSourcePath     = sourcePath;        mAvailable        = isAvailable;        if (image == null) {            image = "";        }        mImage          = image;                mIsDefault = isDefault;            }    //-------------------------------------------------------------------------    /**      * Build from an existing page definition     *     * @param JahiaPageDefinition template     * @param boolean isDefault , true if the template the site's default template.     */    public JahiaPageDefinitionTemp ( JahiaPageDefinition template , boolean isDefault)    {        if ( template == null )        	return;        	        mID             = template.getID();        mSiteID         = template.getJahiaID();        mName 			= template.getName();        mSourcePath     = template.getSourcePath();        mAvailable      = template.isAvailable();        mImage          = template.getImage();        mIsDefault		= isDefault;    }    //-------------------------------------------------------------------------    /** Return the page definition unique identification number.     *     * @return  The identification number.     */    public final int getID () {        return mID;    }    //-------------------------------------------------------------------------    /** Get the image path     *     * @return String path to the image.     */    public String getImage() {        return mImage;    }    //-------------------------------------------------------------------------    /** Return the site unique identification number.     *     * @return  The site identification number.     */    public final int getJahiaID() {        return mSiteID;    }    //-------------------------------------------------------------------------    /** Return the page definition name.     *     * @return  The page definition name.     */    public final String getName() {        return mName;    }    //-------------------------------------------------------------------------    /** Return the JSP file associated with the page definition.     *     * @return  The source path.     */    public final String getSourcePath() {        return mSourcePath;    }    //-------------------------------------------------------------------------    /** Get the Available status     *     * @return  Return true if the page definition is available or false if     *          it's not.     */    public final boolean isAvailable () {        return mAvailable;    }    //-------------------------------------------------------------------------    /** Get the Default status     *     * @return  Return true if the page definition is the site's default template      *			or false if it's not.     */    public final boolean isDefault () {        return mIsDefault;    }    //-------------------------------------------------------------------------    /** Set the image's path     *     * @param   value   The new image path.     */    public void setImage (String value) {        mImage = value;    }    //-------------------------------------------------------------------------    /** Set the Jahia ID.     *     * @param   value   The new Jahia ID.     */    public void setJahiaID (int value) {        mSiteID = value;    }    //-------------------------------------------------------------------------    /** Set the page definition name.     *     * @param   value   The new page definition name.     */    public void setName (String value) {        mName = value;    }    //-------------------------------------------------------------------------    /** Set the source path.     *     * @param   value   The new source path.     */    public void setSourcePath (String value) {        mSourcePath = value;    }    //-------------------------------------------------------------------------    /** Set the available status.     *     * @param   value   Set the new available status. True the Definition page     *                  will be available, false it won't.     */    public void setAvailable (boolean value) {        mAvailable = value;    }    //-------------------------------------------------------------------------    /** Set the default status.     *     * @param   value   Set the new default status. True the Definition page     *                  will be the default template of the site.     */    public void setDefault (boolean value) {        mIsDefault = value;    }} // end JahiaPageDefinitionTemp

⌨️ 快捷键说明

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