Compiere 3.1

org.compiere.model
Class MContainer

java.lang.Object
  extended by org.compiere.framework.PO
      extended by org.compiere.model.X_CM_Container
          extended by org.compiere.model.MContainer
All Implemented Interfaces:
Serializable, Cloneable, Comparator<PO>, 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
accessLevel, CM_CONTAINERLINK_ID_AD_Reference_ID, CONTAINERTYPE_AD_Reference_ID, CONTAINERTYPE_Document, CONTAINERTYPE_ExternalURL, CONTAINERTYPE_InternalLink, Model, Table_ID, Table_Name, updatedMS
 
Fields inherited from class org.compiere.framework.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_changeVO, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
 
Constructor Summary
MContainer(Ctx ctx, int CM_Container_ID, String trxName)
          Standard Constructor
MContainer(Ctx 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 deploy(MWebProject project, MCStage stage, String path)
          Deploy Stage into Container
static MContainer get(Ctx ctx, int CM_Container_ID, int CM_WebProject_Id, String trxName)
          get Container
static MContainer get(Ctx 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 getByName(Ctx ctx, String Name, int CM_WebProject_Id, String trxName)
          get Container by Name
static MContainer getByTitle(Ctx ctx, String Title, int CM_WebProject_Id, String trxName)
          get Container by Title
static MContainer[] getContainers(MWebProject project)
          Get Containers
static MContainer getDirect(Ctx 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_WebProject_ID, getContainerLinkURL, getContainerType, getContainerXML, getDescription, getHelp, getKeyNamePair, getMeta_Author, getMeta_Content, getMeta_Copyright, getMeta_Description, getMeta_Keywords, getMeta_Language, getMeta_Publisher, getMeta_RobotsTag, getName, getRelativeURL, getStructureXML, getTitle, initPO, isContainerTypeValid, 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, setRelativeURL, setStructureXML, setTitle
 
Methods inherited from class org.compiere.framework.PO
addAttachment, addAttachment, addError, beforeSave, compare, convertToBigDecimal, convertToBoolean, convertToInt, convertToTimestamp, copy, copyValues, copyValues, createAttachment, delete_Accounting, delete, delete, dump, dump, equals, get_ChangeVO, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_EntityType, get_HashMap, get_ID, get_IDOld, get_Info, get_KeyColumns, get_Logger, get_Table_ID, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_ValuesAsString, get_WhereClause, get_xmlDocument, get_xmlString, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getVO, hashCode, insert_Accounting, is_Changed, is_KeyColumn, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveNewInsertSQL, saveNewSpecial, saveUpdate, set_ChangeVO, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueString, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setContext, setCtx, setDocWorkflowMgr, setIsActive, setStandardDefaults, setUpdateable, setUpdatedBy, toStringX, unlock, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MContainer

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

Parameters:
ctx - context
CM_Container_ID - id
trxName - transaction

MContainer

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

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

get

public static MContainer get(Ctx 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

getByName

public static MContainer getByName(Ctx ctx,
                                   String Name,
                                   int CM_WebProject_Id,
                                   String trxName)
get Container by Name

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

getByTitle

public static MContainer getByTitle(Ctx ctx,
                                    String Title,
                                    int CM_WebProject_Id,
                                    String trxName)
get Container by Title

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

get

public static MContainer get(Ctx 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

deploy

public static MContainer deploy(MWebProject project,
                                MCStage stage,
                                String path)
Deploy Stage into Container

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

getDirect

public static MContainer getDirect(Ctx 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 -

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.