Adempiere 3.5.2a

org.compiere.model
Class MContainer

java.lang.Object
  extended by org.compiere.model.PO
      extended by org.compiere.model.X_CM_Container
          extended by org.compiere.model.MContainer
All Implemented Interfaces:
Serializable, Comparator, I_CM_Container, I_Persistent, Evaluatee

public class MContainer
extends X_CM_Container

Container Model

Version:
$Id: MContainer.java,v 1.20 2006/09/05 23:22:53 comdivision Exp $
Author:
Yves Sandfort
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.compiere.model.X_CM_Container
CM_CONTAINERLINK_ID_AD_Reference_ID, CONTAINERTYPE_AD_Reference_ID, CONTAINERTYPE_Document, CONTAINERTYPE_ExternalURL, CONTAINERTYPE_InternalLink
 
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
 
Fields inherited from interface org.compiere.model.I_CM_Container
accessLevel, COLUMNNAME_CM_Container_ID, COLUMNNAME_CM_ContainerLink_ID, COLUMNNAME_CM_Template_ID, COLUMNNAME_CM_WebProject_ID, COLUMNNAME_ContainerLinkURL, COLUMNNAME_ContainerType, COLUMNNAME_ContainerXML, COLUMNNAME_Description, COLUMNNAME_Help, COLUMNNAME_IsIndexed, COLUMNNAME_IsSecure, COLUMNNAME_IsSummary, COLUMNNAME_IsValid, COLUMNNAME_Meta_Author, COLUMNNAME_Meta_Content, COLUMNNAME_Meta_Copyright, COLUMNNAME_Meta_Description, COLUMNNAME_Meta_Keywords, COLUMNNAME_Meta_Language, COLUMNNAME_Meta_Publisher, COLUMNNAME_Meta_RobotsTag, COLUMNNAME_Name, COLUMNNAME_Notice, COLUMNNAME_Priority, COLUMNNAME_RelativeURL, COLUMNNAME_StructureXML, COLUMNNAME_Title, Model, Table_ID, Table_Name
 
Constructor Summary
MContainer(Properties ctx, int CM_Container_ID, String trxName)
          Standard Constructor
MContainer(Properties ctx, ResultSet rs, String trxName)
          Load Constructor
 
Method Summary
protected  boolean afterDelete(boolean success)
          After Delete
protected  boolean afterSave(boolean newRecord, boolean success)
          After Save.
protected  boolean beforeDelete()
          Executed before Delete operation.
static MContainer copy(MWebProject project, MCStage stage, String path)
          Copy Stage into Container
static MContainer get(Properties ctx, int CM_Container_ID, int CM_WebProject_Id, String trxName)
          get Container
static MContainer get(Properties ctx, String relURL, int CM_WebProject_Id, String trxName)
          get Container by Relative URL
 int getAD_Tree_ID()
          Get AD_Tree_ID
protected  MContainerElement[] getAllElements()
           
static MContainer[] getContainers(MWebProject project)
          Get Containers
static MContainer getDirect(Properties ctx, int CM_Container_ID, String trxName)
          Get Container directly from DB (not cached)
 MTemplate getTemplate()
          Get Template from Cache, or load it
 MWebProject getWebProject()
          Get Web Project
 void reIndex(boolean newRecord)
          reIndex
protected  int saveNew_getID()
          SaveNew getID
protected  void setStage(MWebProject project, MCStage stage, String path)
          Set/Copy Stage
 String toString()
          String Representation
protected  void updateElements(MWebProject project, MCStage stage, String trxName)
          Update Elements in Container from Stage
protected  void updateTTables(MWebProject project, MCStage stage, String trxName)
          Update Elements in Container from Stage
 
Methods inherited from class org.compiere.model.X_CM_Container
get_AccessLevel, getCM_Container_ID, getCM_ContainerLink_ID, getCM_Template_ID, getCM_Template, getCM_WebProject_ID, getCM_WebProject, getContainerLinkURL, getContainerType, getContainerXML, getDescription, getHelp, getKeyNamePair, getMeta_Author, getMeta_Content, getMeta_Copyright, getMeta_Description, getMeta_Keywords, getMeta_Language, getMeta_Publisher, getMeta_RobotsTag, getName, getNotice, getPriority, getRelativeURL, getStructureXML, getTitle, initPO, isIndexed, isSecure, isSummary, isValid, setCM_Container_ID, setCM_ContainerLink_ID, setCM_Template_ID, setCM_WebProject_ID, setContainerLinkURL, setContainerType, setContainerXML, setDescription, setHelp, setIsIndexed, setIsSecure, setIsSummary, setIsValid, setMeta_Author, setMeta_Content, setMeta_Copyright, setMeta_Description, setMeta_Keywords, setMeta_Language, setMeta_Publisher, setMeta_RobotsTag, setName, setNotice, setPriority, setRelativeURL, setStructureXML, setTitle
 
Methods inherited from class org.compiere.model.PO
beforeSave, compare, copyValues, copyValues, createAttachment, delete_Accounting, delete_Tree, delete, delete, deleteEx, deleteEx, dump, dump, equals, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveEx, saveEx, saveNewSpecial, saveReplica, saveUpdate, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setDoc, setDocWorkflowMgr, setIsActive, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.compiere.model.I_Persistent
save
 

Constructor Detail

MContainer

public MContainer(Properties ctx,
                  int CM_Container_ID,
                  String trxName)
Standard Constructor

Parameters:
ctx - context
CM_Container_ID - id
trxName - transaction

MContainer

public MContainer(Properties ctx,
                  ResultSet rs,
                  String trxName)
Load Constructor

Parameters:
ctx - context
rs - result set
trxName - transaction
Method Detail

get

public static MContainer get(Properties ctx,
                             String relURL,
                             int CM_WebProject_Id,
                             String trxName)
get Container by Relative URL

Parameters:
ctx -
relURL -
CM_WebProject_Id -
trxName -
Returns:
Container or null if not found

get

public static MContainer get(Properties ctx,
                             int CM_Container_ID,
                             int CM_WebProject_Id,
                             String trxName)
get Container

Parameters:
ctx -
CM_Container_ID -
CM_WebProject_Id -
trxName -
Returns:
Container or null if not found

copy

public static MContainer copy(MWebProject project,
                              MCStage stage,
                              String path)
Copy Stage into Container

Parameters:
project - WebProject
stage - Stage to copy from
path - Relative URL to it
Returns:
Container

getDirect

public static MContainer getDirect(Properties ctx,
                                   int CM_Container_ID,
                                   String trxName)
Get Container directly from DB (not cached)

Parameters:
ctx - context
CM_Container_ID - Container ID
trxName - transaction
Returns:
Container or null

getContainers

public static MContainer[] getContainers(MWebProject project)
Get Containers

Parameters:
project - Project to use
Returns:
stages

getWebProject

public MWebProject getWebProject()
Get Web Project

Returns:
web project

getTemplate

public MTemplate getTemplate()
Get Template from Cache, or load it

Returns:
Template

getAD_Tree_ID

public int getAD_Tree_ID()
Get AD_Tree_ID

Returns:
tree

setStage

protected void setStage(MWebProject project,
                        MCStage stage,
                        String path)
Set/Copy Stage

Parameters:
project - parent
stage - stage
path - path

updateElements

protected void updateElements(MWebProject project,
                              MCStage stage,
                              String trxName)
Update Elements in Container from Stage

Parameters:
project - project
stage - stage
trxName - Transaction

updateTTables

protected void updateTTables(MWebProject project,
                             MCStage stage,
                             String trxName)
Update Elements in Container from Stage

Parameters:
project - project
stage - stage
trxName - Transaction

saveNew_getID

protected int saveNew_getID()
SaveNew getID

Overrides:
saveNew_getID in class PO
Returns:
ID

toString

public String toString()
String Representation

Overrides:
toString in class X_CM_Container
Returns:
info

afterSave

protected boolean afterSave(boolean newRecord,
                            boolean success)
After Save. Insert - create tree

Overrides:
afterSave in class PO
Parameters:
newRecord - insert
success - save success
Returns:
true if saved

getAllElements

protected MContainerElement[] getAllElements()

beforeDelete

protected boolean beforeDelete()
Description copied from class: PO
Executed before Delete operation.

Overrides:
beforeDelete in class PO
Returns:
true if record can be deleted

afterDelete

protected boolean afterDelete(boolean success)
After Delete

Overrides:
afterDelete in class PO
Parameters:
success -
Returns:
deleted

reIndex

public void reIndex(boolean newRecord)
reIndex

Parameters:
newRecord -

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.