📄 jahiapagetemplateservice.java
字号:
//// ____.// __/\ ______| |__/\. _______// __ .____| | \ | +----+ \// _______| /--| | | - \ _ | : - \_________// \\______: :---| : : | : | \________>// |__\---\_____________:______: :____|____:_____\// /_____|//// . . . i n j a h i a w e t r u s t . . .//// 22.01.2001 NK added page definition properties, ACLpackage org.jahia.services.pages;import java.util.Vector;import java.util.Enumeration;import java.util.Hashtable;import org.jahia.exceptions.JahiaException;import org.jahia.services.JahiaService;import org.jahia.services.pages.JahiaPageDefinition;import org.jahia.services.acl.JahiaBaseACL;import org.jahia.data.JahiaDOMObject;/** * This interface defines all the methods a page template service should * implement, so that it can be intergrated into Jahia. * * @author Fulco Houkes * @version 1.0 */public abstract class JahiaPageTemplateService extends JahiaService{ //------------------------------------------------------------------------- /** Create a new page template. * * @param int siteID The jahia site ID. * @param String name The page template name. * @param String sourcePath The page template source path. * @param boolean isAvailable True is the page template is available in edition * mode or false if it should be hidden. * @param String image Image path. * @param int parentAclID The parent ACL id * * @return Return a new page template instanciation. * * @exception JahiaException Throws this exception when any error occured * in the page template creation process. */ public abstract JahiaPageDefinition createPageTemplate ( int siteID, String name, String sourcePath, boolean isAvailable, String image, int parentAclID ) throws JahiaException; //------------------------------------------------------------------------- /** Deletes the specified page template. * * @param templateID The page template ID. * * @exception JahiaException * Throws this exception if any error occured in the deletion process. * * @exception JahiaException * Return this exception if any failure occured. */ public abstract void deletePageTemplate (int templateID) throws JahiaException; //-------------------------------------------------------------------------- /** Gets all the page template IDs. * * @return Return a Vector of page template IDs * * @exception JahiaException * Return this exception if any failure occured. */ public abstract Vector getAllPageTemplateIDs () throws JahiaException; //------------------------------------------------------------------------- /** Check if a page already has the same source path * * @param path The full path with filename to the template file to check * * @return Return the reference on the page template having the same * specified source path. Return null if no template exists, * matching the source path. */ public abstract JahiaPageDefinition getPageTemplateBySourcePath (int siteID, String path) throws JahiaException; //------------------------------------------------------------------------- /** Try to find the specified page template. * * @param templateID The page template ID. * * @return Return a valid instance of a JahiaPageDefinition class. If the * page template doesn't exist an exception is thrown. * * @exception JahiaException * Throws this exception if any error occured in the lookup process. */ public abstract JahiaPageDefinition lookupPageTemplate (int templateID) throws JahiaException; //------------------------------------------------------------------------- /** Try to find the specified page template. * * @param name The name of the requested page template. * @param siteID Jahia site ID. * * @return Return a valid instance of a JahiaPageDefinition class. If the * page template doesn't exist an exception is thrown. * * @exception JahiaException * Throws this exception if any error occured in the lookup process. */ public abstract JahiaPageDefinition lookupPageTemplateByName (String name, int siteID) throws JahiaException; //------------------------------------------------------------------------- /** Return a list of all the page templates depending of the site ID and * if there are available or not (according to the passed paramters). * * @param jahiaID The jahia site ID. * @param availableOnly Set true to get all the available template, or * false to the other ones. * * @return Return an Enumeration holding all the page templates matching * the site ID and the visibility requierments. */ public abstract Enumeration getPageTemplates (int jahiaID, boolean availableOnly) throws JahiaException; //------------------------------------------------------------------------- /** * Return the number of page templates in the database. * * @return * Return the number of page templates. */ public abstract int getNbPageTemplates () throws JahiaException; //------------------------------------------------------------------------- /** * Return the number of page templates in the database for a gived site. * * @param int siteID * @return * Return the number of page templates. */ public abstract int getNbPageTemplates (int siteID) throws JahiaException; //-------------------------------------------------------------------------- /** * returns a DOM representation of all page def of a site * * @param int siteID * @auhtor NK */ public abstract JahiaDOMObject getPageDefsAsDOM( int siteID ) throws JahiaException; //-------------------------------------------------------------------------- /** * returns a DOM representation of all page def props of a site * * @param int siteID * @auhtor NK */ public abstract JahiaDOMObject getPageDefPropsAsDOM( int siteID ) throws JahiaException; //-------------------------------------------------------------------------- /** * Returns a vector of all page templates' Acl ID of this site * Need this for site extraction * * @param int siteID */ public abstract Vector getAclIDs( int siteID ) throws JahiaException; // Patch --------------------------------------------------- // 30.01.2002 : NK patch for old databases containing templates without ACL // Do create ACL for them. public abstract void patchTemplateWithoutACL() throws JahiaException;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -