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

📄 jahiafieldservice.java

📁 java 写的一个新闻发布系统
💻 JAVA
字号:
////                                   ____.//                       __/\ ______|    |__/\.     _______//            __   .____|    |       \   |    +----+       \//    _______|  /--|    |    |    -   \  _    |    :    -   \_________//   \\______: :---|    :    :           |    :    |         \________>//           |__\---\_____________:______:    :____|____:_____\//                                      /_____|////                 . . . i n   j a h i a   w e   t r u s t . . .//////  FieldServices//  EV      31.10.2000//  FH      28.12.2000  Changed interface to abstract class//  DJ      05.01.2001  Changed almost everything////  buildFieldStructureForPage( pageID )////	getFieldIDsInPage( pageID )//	getAllFieldsIDs() // for the search engine//  getAllFieldDefinitionIDs()////  loadField( fieldID )//	loadField( fieldID, loadFlag )//	loadField( fieldID, jParams )//	loadField( fieldID, loadFlag, jParams )//	saveField( theField )//	deleteField( fieldID )////	loadFieldDefinition( int definitionID )//	saveFieldDefinition( JahiaFieldDefinition theDef )//  deleteFieldDefinition( theDef )//package org.jahia.services.fields;import java.util.*;                     // Vectorimport org.jahia.utils.*;           // JahiaExceptionimport org.jahia.services.*;        // JahiaServiceimport org.jahia.params.*;          // ParamBeanimport org.jahia.data.*;            // JahiaDataimport org.jahia.data.fields.*;     // JahiaFieldimport org.jahia.services.fields.*; // LoadFlagsimport org.jahia.exceptions.JahiaException;public abstract class JahiaFieldService extends JahiaService {    /**     * create a JahiaField.     * The only method to instanciate a new JahiaField     * It call the constructor corresponding to the field type.     *     */     public abstract JahiaField createJahiaField(int ID,                            int         jahiaID,                            int         pageID,                            int         ctnid,                            int         fieldDefID,                            int         fieldType,                            int         connectType,                            String      fieldValue,                            int         rank,                            int         aclID )     throws JahiaException;    /**     * clone page field     *     * @param   fieldID     the field to clone.     * @param   newPageID   The Id of the new page to which the cloned field must     *                      belong to.     */     public abstract void cloneField (int fieldID, int newPageID, int parentAclID)     throws JahiaException;     /**     * clone page field     *     * @param   fieldID             the field to clone.     * @param   newctnid      the id of the container which contains the field     *                              equal 0 if the field is in a page.     * @param   newPageID           The Id of the new page to which the cloned field must     *                              belong to.     */     public abstract JahiaField cloneField (JahiaField theField, int newctnid, int newPageID, int parentAclID, boolean childrenCloned)     throws JahiaException;   /***        * Builds the field structure for the specified page        *        * @param        jData               JahiaData        * @return       a JahiaFieldSet object        *        */    public abstract JahiaFieldSet buildFieldStructureForPage( JahiaData jData )        throws JahiaException;   /***        * Gets all field IDs in a page (from page ID)        *        * @param        pageID              the page ID        * @return       a Vector of Field list IDs        *        */    public abstract Vector getFieldIDsInPage( int pageID )        throws JahiaException;  /***        * Given a page ID, get all the IDs of the page links contained in        * the page, whether of type DIRECT, INTERNAL or URL        *        * @param        pageID              the page ID        * @return       a Vector of Field list IDs        *        */    public abstract Vector getPagefieldIDsInPage( int pageID )        throws JahiaException;   /***        * Gets a field ID from its name and page id        *        * @param        fieldName           the field name        * @param        pageID              the page ID        * @return       a field id        *        */    public abstract int getFieldID( String fieldName, int pageID )        throws JahiaException;   /***        * Get all the fields ID (for the search engine)        *        * @return       a Vector of field ids        *        */    public abstract Vector getAllFieldIDs()        throws JahiaException;   /***        * Get all the fields ID for a gived site (for the search engine)        *        * @param		int the site id        * @return       a Vector of field ids        *        */    public abstract Vector getAllFieldIDs(int siteID)        throws JahiaException;   /***        * gets all the field definition ids        * to be changed, using a fielddefinition cache instead and changing the def registry.        *        * @return       a Vector of field definition ids        *        */    public abstract Vector getAllFieldDefinitionIDs()        throws JahiaException;   /***        * loads a field from the database, no other info than what's in the database<br>        * NO RIGHTS CHECK!        *        * @param        fieldID             the field ID        * @return       a JahiaField object        * @see          org.jahia.data.fields.JahiaField        *        */    public abstract JahiaField loadField( int fieldID )        throws JahiaException;   /***        * loads a field from the database, according to the loadflags.        * Checks user's rights.        *        * @param        fieldID             the field ID        * @param        loadFlag            the load flags        * @return       a JahiaField object        * @see          org.jahia.data.fields.JahiaField        * @see          org.jahia.data.fields.LoadFlags        *        */    public abstract JahiaField loadField( int fieldID, int loadFlag )        throws JahiaException;   /***        * loads a field from the database, with all values.        * Checks user's rights.        *        * @param        fieldID             the field ID        * @param        jParams             the ParamBean object with request and response        * @return       a JahiaField object        * @see          org.jahia.data.fields.JahiaField        * @see          org.jahia.data.fields.LoadFlags        *        */    public abstract JahiaField loadField( int fieldID, ParamBean jParams )        throws JahiaException;   /***        * loads a field, and accept loadFlag and ParamBean <br>        * uses loadField ( int fieldID ) method to access cache/database.        * Checks user's rights.        *        * @param        fieldID             the field ID        * @param        loadFlag            the load flags        * @param        jParam              ParamBean        * @return       a JahiaField object        */    public abstract JahiaField loadField( int fieldID, int loadFlag, ParamBean jParams )        throws JahiaException;   /***        * saves a field<br>        * NO RIGHTS CHECK!        *        * @param        theField            the JahiaField to save        * @param        parentAclID         the Acl parent ID        *        *///    public abstract void saveField( JahiaField theField, int parentAclID )//        throws JahiaException;   /***        * saves a field if the user has the correct rights.        * Check user's rights        *        * @param        theField            the JahiaField to save        * @param        parentAclID         the Acl parent ID        * @param        jParam              ParamBean        *        */    public abstract void saveField( JahiaField theField, int parentAclID, ParamBean jParams )        throws JahiaException;   /***        * deletes a field        *        * @param        theField            the JahiaField to delete        *        */    public abstract void deleteField( int fieldID, ParamBean jParams )        throws JahiaException;    /***        * Loads a Field Definition by its id        *        * @param        defID               the field definition id        * @return       a JahiaFieldDefinition object        * @see          org.jahia.data.fields.JahiaFieldDefinition        *        */    public abstract JahiaFieldDefinition loadFieldDefinition( int defID )        throws JahiaException;    /***        * Saves a Field Definition        *        * @param        theDef              the JahiaFieldDefinition object to save        * @see          org.jahia.data.fields.JahiaFieldDefinition        *        */    public abstract void saveFieldDefinition( JahiaFieldDefinition theDef )        throws JahiaException;    /***        * Delete a Field Definition and it's sub definition.        *        * @param int the field def ID        */    public abstract void deleteFieldDefinition(int fieldDefID)        throws JahiaException;    //--------------------------------------------------------------------------    /**     * returns a DOM representation of all fields of a site     *     * @param int siteID     * @auhtor NK     */    public abstract JahiaDOMObject getFieldsAsDOM( int siteID )    throws JahiaException;    //--------------------------------------------------------------------------    /**     * returns a DOM representation of all field def of a site     *     * @param int siteID     * @auhtor NK     */    public abstract JahiaDOMObject getFieldDefsAsDOM( int siteID )    throws JahiaException;    //--------------------------------------------------------------------------    /**     * returns a DOM representation of all field def props of a site     *     * @param int siteID     * @auhtor NK     */    public abstract JahiaDOMObject getFieldDefPropsAsDOM( int siteID )    throws JahiaException;    //--------------------------------------------------------------------------    /**     * Returns a vector of all Acl ID used by fields for a site     * Need this for site extraction     *     * @param int siteID     * @auhtor NK     */    public abstract Vector getAclIDs( int siteID )    throws JahiaException;    /**     * Returns the path to the folder containing the field definitions     *     * @return     */    public abstract String getFieldDefinitionsDiskPath();    /**     * Compose the file absolute path to a flat file containing the default value for a field definition.     *     * @param siteID     * @param name     * @return     */    public abstract String composeFieldDefDefaultValueFilePath(int siteID, String name);} // end JahiaFieldServices

⌨️ 快捷键说明

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