Package org.compiere.model
Class MSetup
- java.lang.Object
-
- org.compiere.model.MSetup
-
public final class MSetup extends Object
Initial Setup Model- Version:
- $Id: MSetup.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
- FR [ 1795384 ] Setup: create default accounts records is too rigid, Carlos Ruiz - globalqss
- Setup correctly IsSOTrx for return documents
-
-
Constructor Summary
Constructors Constructor Description MSetup(Properties ctx, int WindowNo)
ConstructorMSetup(Properties ctx, int WindowNo, boolean dryRun)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
createAccounting(KeyNamePair currency, boolean hasProduct, boolean hasBPartner, boolean hasProject, boolean hasMCampaign, boolean hasSRegion, boolean hasActivity, File AccountingFile, boolean useDefaultCoA, boolean inactivateDefaults)
Create Accounting elementsboolean
createAccounting(KeyNamePair currency, boolean hasProduct, boolean hasBPartner, boolean hasProject, boolean hasMCampaign, boolean hasSRegion, File AccountingFile)
boolean
createClient(String clientName, String orgValue, String orgName, String userClient, String userOrg, String phone, String phone2, String fax, String eMail, String taxID, String adminEmail, String userEmail, boolean isSetInitialPassword)
Create Client Infoboolean
createEntities(int C_Country_ID, String City, int C_Region_ID, int C_Currency_ID, String postal, String address1)
Create Default main entitiesint
getAD_Client_ID()
Get Clientint
getAD_Org_ID()
Get AD_Org_IDint
getAD_User_ID()
Get AD_User_IDString
getInfo()
Get InfoString
getTrxName()
void
rollback()
Rollback Internal Transaction
-
-
-
Field Detail
-
log
protected CLogger log
Logger
-
-
Constructor Detail
-
MSetup
public MSetup(Properties ctx, int WindowNo)
Constructor- Parameters:
ctx
- contextWindowNo
- window
-
MSetup
public MSetup(Properties ctx, int WindowNo, boolean dryRun)
Constructor- Parameters:
ctx
- contextWindowNo
- window
-
-
Method Detail
-
createClient
public boolean createClient(String clientName, String orgValue, String orgName, String userClient, String userOrg, String phone, String phone2, String fax, String eMail, String taxID, String adminEmail, String userEmail, boolean isSetInitialPassword)
Create Client Info. - Client, Trees, Org, Role, User, User_Role- Parameters:
clientName
- client nameorgName
- org nameuserClient
- user id clientuserOrg
- user id orgisSetInitialPassword
-- Returns:
- true if created
-
createAccounting
public boolean createAccounting(KeyNamePair currency, boolean hasProduct, boolean hasBPartner, boolean hasProject, boolean hasMCampaign, boolean hasSRegion, File AccountingFile)
-
createAccounting
public boolean createAccounting(KeyNamePair currency, boolean hasProduct, boolean hasBPartner, boolean hasProject, boolean hasMCampaign, boolean hasSRegion, boolean hasActivity, File AccountingFile, boolean useDefaultCoA, boolean inactivateDefaults)
Create Accounting elements. - Calendar - Account Trees - Account Values - Accounting Schema - Default Accounts- Parameters:
currency
- currencyhasProduct
- has product segmenthasBPartner
- has bp segmenthasProject
- has project segmenthasMCampaign
- has campaign segmenthasSRegion
- has sales region segmenthasActivity
- has activity segmentAccountingFile
- file name of accounting fileinactivateDefaults
- inactivate the default accounts after createduseDefaultCoA
- use the Default CoA (load and group summary account)- Returns:
- true if created
-
createEntities
public boolean createEntities(int C_Country_ID, String City, int C_Region_ID, int C_Currency_ID, String postal, String address1)
Create Default main entities. - Dimensions and BPGroup, Prod Category) - Location, Locator, Warehouse - PriceList - Cashbook, PaymentTerm- Parameters:
C_Country_ID
- countryCity
- cityC_Region_ID
- regionC_Currency_ID
- currency- Returns:
- true if created
-
getAD_Client_ID
public int getAD_Client_ID()
Get Client- Returns:
- AD_Client_ID
-
getAD_Org_ID
public int getAD_Org_ID()
Get AD_Org_ID- Returns:
- AD_Org_ID
-
getAD_User_ID
public int getAD_User_ID()
Get AD_User_ID- Returns:
- AD_User_ID
-
getInfo
public String getInfo()
Get Info- Returns:
- Info
-
rollback
public void rollback()
Rollback Internal Transaction
-
getTrxName
public String getTrxName()
- Returns:
- trxName
-
-