Class InitialSetupUtility
- java.lang.Object
-
- org.openbravo.erpCommon.businessUtility.InitialSetupUtility
-
public class InitialSetupUtility extends Object
- Author:
- David Alsasua Initial Client Setup Utility class
-
-
Constructor Summary
Constructors Constructor Description InitialSetupUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
existsClientName(String strClient)
static boolean
existsOrgName(Client client, String strOrgName)
static boolean
existsUserName(String strUser)
static List<List>
getAcctSchemaElements()
Returns the relation of ad_ref_list elements for the reference with AD_Reference_id='181' (Acct.schema elements)static List<Module>
getCOAModules(String strModules)
Returns the set of Module objects for the given idsstatic Currency
getCurrency(String strCurrencyID)
static String
getDatasetContent(DataSet dataset)
static List<DataSet>
getDataSets(Module module, String accessLevel)
Deprecated.static List<DataSet>
getDataSets(Module module, List<String> accessLevel)
Given a module, and an access level, returns all the datasets contained in that modulestatic ElementValue
getElementValue(Element element, String value)
static Language
getLanguage(String strLanguage)
static Tree
getOrgTree(Client client)
static List<Module>
getRDModules(String strModules)
Returns the set of Module objects for the given idsstatic Tree
getSystemMenuTree(String strTreeTypeMenu)
Returns the tree of the provided typestatic String
getTranslatedColumnName(Language language, String columnName)
static String
getTranslatedElement(Language language, String columnName, String elementName)
static String
getTranslatedMessage(Language language, String msgId)
static Tree
getTree(String strTreeTypeMenu, Client client, Organization orgProvided)
Returns the tree of the provided typestatic Tree
getTree(Table table, Client client, Organization orgProvided)
Returns the ADTree associated with the given tablestatic List<TreeNode>
getTreeNode(Tree accountTree, Client client)
Returns the nodes of a given treestatic List<TreeNode>
getTreeNode(Tree accountTree, Client client, Organization orgProvided)
Returns the nodes of a given treestatic TreeNode
getTreeNode(Organization org, Tree tree, Client client)
static AcctSchema
insertAcctSchema(Client client, Organization orgProvided, Currency currency, String name, String gAAP, String costingMethod, boolean hasAlias)
static AcctSchemaDefault
insertAcctSchemaDefault(HashMap<String,ElementValue> defaultElementValues, AcctSchema acctSchema)
static AcctSchemaElement
insertAcctSchemaElement(AcctSchema acctSchema, Organization orgProvided, List listElement, Long sequence, boolean isMandatory, boolean isBalanced, ElementValue defaultAccount, Element accountingElement)
static AcctSchemaGL
insertAcctSchemaGL(HashMap<String,ElementValue> defaultElementValues, AcctSchema acctSchema)
static Calendar
insertCalendar(Client client, Organization orgProvided, String name)
static GLCategory
insertCategory(Client client, Organization organization, String name, String categoryType, boolean isDefault)
static Client
insertClient(String strClientName, String strCurrency)
static ClientInformation
insertClientinfo(Client client, Tree menuTree, Tree orgTree, Tree bpartnerTree, Tree projectTree, Tree salesRegionTree, Tree productTree, Boolean boDiscountCalculatedFromLineAmounts)
Deprecated.use new insertClientinfo method where new parameter "campaignTree" is addedstatic ClientInformation
insertClientinfo(Client client, Tree menuTree, Tree orgTree, Tree bpartnerTree, Tree projectTree, Tree salesRegionTree, Tree productTree, Tree campaignTree, Boolean boDiscountCalculatedFromLineAmounts)
static ADClientModule
insertClientModule(Client client, Module module)
static DocumentType
insertDocType(Client client, Organization organization, String name, String printName, String docBaseType, String docSubTypeSO, DocumentType shipment, DocumentType invoice, boolean isDocNoControlled, Sequence sequence, GLCategory category, boolean isSOTrx, Table table)
static DocumentTemplate
insertDoctypeTemplate(DocumentType document, String name, String templateLocation, String templateFileName, String reportFileName)
static Element
insertElement(Client client, Organization orgProvided, String name, Tree accountTree, Boolean bNaturalAccount)
static ElementValue
insertElementValue(Element element, Organization orgProvided, String name, String value, String description, String accountType, String accountSign, boolean isDocControlled, boolean isSummary, String elementLevel, boolean doFlush)
static ElementValue
insertElementValue(Element element, Organization orgProvided, String name, String value, String description, String accountType, String accountSign, boolean isDocControlled, boolean isSummary, String elementLevel, boolean doFlush, String showValueCond, String titleNode)
static EmailTemplate
insertEmailTemplate(DocumentTemplate documentTemplate)
static ElementValueOperand
insertOperand(ElementValue elementValue, ElementValue operand, Long sign, Long sequence)
static OrganizationAcctSchema
insertOrgAcctSchema(Client client, AcctSchema acctSchema, Organization orgProvided)
static Organization
insertOrganization(String strOrgName, OrganizationType orgType, String strcLocationId, Client client)
static Organization
insertOrganization(String strOrgName, OrganizationType orgType, String strcLocationId, Client client, Currency strCurrency)
static ADOrgModule
insertOrgModule(Client client, Organization orgProvided, Module module)
static ImportResult
insertReferenceData(DataSet dataset, Client client, Organization orgProvided)
Given a dataset, inserts the elements in the xml file into database.static Role
insertRole(Client client, Organization orgProvided, String name, String strUserLevelProvided)
static Role
insertRole(Client client, Organization orgProvided, String name, String strUserLevelProvided, boolean isClientAdmin)
static RoleOrganization
insertRoleOrganization(Role role, Organization orgProvided)
static RoleOrganization
insertRoleOrganization(Role role, Organization orgProvided, boolean isOrgAdmin)
static Sequence
insertSequence(Client client, Organization organization, String name, Long startNo)
static Tree
insertTree(Client client, String name, String treeType, Boolean boIsAllNodes)
Deprecated.use new insertTree method where new parameter "table" is addedstatic Tree
insertTree(Client client, String name, String treeType, Boolean boIsAllNodes, Table table)
static User
insertUser(Client client, Organization orgProvided, String name, String password, Role role, Language defaultLanguage)
static UserRoles
insertUserRole(Client client, User user, Organization orgProvided, Role role)
static UserRoles
insertUserRole(Client client, User user, Organization orgProvided, Role role, boolean isRoleAdmin)
static void
insertUserRoles(Client client, User user, Organization organization, Role role)
Inserts a new role for the created client and user.static Year
insertYear(Client client, Organization orgProvided, Calendar calendar, String strYearName)
static void
setClientImages(Client client)
static boolean
setClientInformation(Client client, ClientInformation clientInfo)
Associates a client info record to a clientstatic void
setCompanyLogo(SystemInformation sys, Client client)
static void
setCompanyLogoDark(SystemInformation sys, Client client)
static void
setCompanyLogoForDocs(SystemInformation sys, Client client)
static void
setCompanyLogoForReceipts(SystemInformation sys, Client client)
static void
setCompanyLogoSubmark(SystemInformation sys, Client client)
static void
setCompanyLogoSubmarkDark(SystemInformation sys, Client client)
static void
setOrgImage(Client client, Organization org, byte[] image, String strImageName)
Deprecated.static void
setOrgImage(Client client, Organization org, ClientInformation clientInfo)
static void
setYourCompanyBigImage(SystemInformation sys, Client client)
Deprecated.static void
setYourCompanyDocumentImage(SystemInformation sys, Client client)
Deprecated.static void
setYourCompanyMenuImage(SystemInformation sys, Client client)
Deprecated.static List<TableTree>
tableTreeRelation()
Returns the relation of trees that use the ADTree tree structure, AD_TABLE_TREE tablestatic List<List>
treeRelation()
Deprecated.use tableTreeRelation, because it retrieves all tableTrees, instead of only the trees defined in the DA_TreeType type list reference Returns the relation of trees defined in the reference list of the application dictionary called AD_TreeType Typestatic void
updateAccountTree(List<TreeNode> treeNodes, HashMap<String,Long> mapSequence, HashMap<String,String> mapElementValueValue, HashMap<String,String> mapElementValueId, HashMap<String,String> mapParent, boolean doFlush)
Sorts the account tree (stored in ADTreeNode) according to the order providedstatic void
updateOrgLocation(Organization org, Location location)
static void
updateOrgTree(Tree tree, TreeNode orgNode, Organization parentOrg)
-
-
-
Method Detail
-
existsClientName
public static boolean existsClientName(String strClient) throws Exception
- Parameters:
strClient
- name of the client- Returns:
- true if exists client in database with provided name
- Throws:
Exception
-
existsUserName
public static boolean existsUserName(String strUser) throws Exception
- Parameters:
strUser
- user name- Returns:
- true if exists a user with the name provided in database
- Throws:
Exception
-
insertClient
public static Client insertClient(String strClientName, String strCurrency) throws Exception
- Parameters:
strClientName
- client namestrCurrency
- currency id- Returns:
- Client object for the created client
- Throws:
Exception
-
getCurrency
public static Currency getCurrency(String strCurrencyID) throws Exception
- Parameters:
strCurrencyID
- c_currency_id- Returns:
- Currency object that belongs to provided id
- Throws:
Exception
-
getLanguage
public static Language getLanguage(String strLanguage) throws Exception
- Parameters:
strLanguage
- language key (for example en_US)- Returns:
- Language object corresponding to provided key
- Throws:
Exception
-
treeRelation
@Deprecated public static List<List> treeRelation() throws Exception
Deprecated.use tableTreeRelation, because it retrieves all tableTrees, instead of only the trees defined in the DA_TreeType type list reference Returns the relation of trees defined in the reference list of the application dictionary called AD_TreeType Type- Returns:
- java.util.List<org.openbravo.model.ad.domain.List>: the relation of AD list elements
- Throws:
Exception
-
tableTreeRelation
public static List<TableTree> tableTreeRelation() throws Exception
Returns the relation of trees that use the ADTree tree structure, AD_TABLE_TREE table- Returns:
- java.util.List<TableTree>: the relation of all the trees that use the ADTree tree structure
- Throws:
Exception
-
getSystemMenuTree
public static Tree getSystemMenuTree(String strTreeTypeMenu) throws Exception
Returns the tree of the provided type- Parameters:
strTreeTypeMenu
- two letters corresponding to the tree type for the menu- Returns:
- Tree menu element (defined at system level)
- Throws:
Exception
-
insertTree
@Deprecated public static Tree insertTree(Client client, String name, String treeType, Boolean boIsAllNodes) throws Exception
Deprecated.use new insertTree method where new parameter "table" is added- Parameters:
client
-name
-treeType
-boIsAllNodes
-- Returns:
- object Tree for the new tree
- Throws:
Exception
-
insertTree
public static Tree insertTree(Client client, String name, String treeType, Boolean boIsAllNodes, Table table) throws Exception
- Throws:
Exception
-
insertClientinfo
@Deprecated public static ClientInformation insertClientinfo(Client client, Tree menuTree, Tree orgTree, Tree bpartnerTree, Tree projectTree, Tree salesRegionTree, Tree productTree, Boolean boDiscountCalculatedFromLineAmounts) throws Exception
Deprecated.use new insertClientinfo method where new parameter "campaignTree" is added- Parameters:
client
-menuTree
-orgTree
-bpartnerTree
-projectTree
-salesRegionTree
-productTree
-boDiscountCalculatedFromLineAmounts
-- Returns:
- ClientInformation object for the new element
- Throws:
Exception
-
insertClientinfo
public static ClientInformation insertClientinfo(Client client, Tree menuTree, Tree orgTree, Tree bpartnerTree, Tree projectTree, Tree salesRegionTree, Tree productTree, Tree campaignTree, Boolean boDiscountCalculatedFromLineAmounts) throws Exception
- Parameters:
client
-menuTree
-orgTree
-bpartnerTree
-projectTree
-salesRegionTree
-productTree
-campaignTree
-boDiscountCalculatedFromLineAmounts
-- Returns:
- ClientInformation object for the new element
- Throws:
Exception
-
setClientInformation
public static boolean setClientInformation(Client client, ClientInformation clientInfo) throws Exception
Associates a client info record to a client- Parameters:
client
-clientInfo
-- Returns:
- true if update was correct
- Throws:
Exception
-
setOrgImage
public static void setOrgImage(Client client, Organization org, ClientInformation clientInfo) throws Exception
- Parameters:
client
-- Throws:
Exception
-
setClientImages
public static void setClientImages(Client client) throws Exception
- Parameters:
client
-- Throws:
Exception
-
setCompanyLogo
public static void setCompanyLogo(SystemInformation sys, Client client)
- Parameters:
sys
-client
-
-
setCompanyLogoDark
public static void setCompanyLogoDark(SystemInformation sys, Client client)
- Parameters:
sys
-client
-
-
setCompanyLogoSubmark
public static void setCompanyLogoSubmark(SystemInformation sys, Client client)
- Parameters:
sys
-client
-
-
setCompanyLogoSubmarkDark
public static void setCompanyLogoSubmarkDark(SystemInformation sys, Client client)
- Parameters:
sys
-client
-
-
setCompanyLogoForDocs
public static void setCompanyLogoForDocs(SystemInformation sys, Client client)
- Parameters:
sys
-client
-
-
setCompanyLogoForReceipts
public static void setCompanyLogoForReceipts(SystemInformation sys, Client client)
- Parameters:
sys
-client
-
-
setOrgImage
@Deprecated public static void setOrgImage(Client client, Organization org, byte[] image, String strImageName) throws Exception
Deprecated.- Throws:
Exception
-
setYourCompanyBigImage
@Deprecated public static void setYourCompanyBigImage(SystemInformation sys, Client client)
Deprecated.- Parameters:
sys
-client
-
-
setYourCompanyDocumentImage
@Deprecated public static void setYourCompanyDocumentImage(SystemInformation sys, Client client)
Deprecated.- Parameters:
sys
-client
-
-
setYourCompanyMenuImage
@Deprecated public static void setYourCompanyMenuImage(SystemInformation sys, Client client)
Deprecated.- Parameters:
sys
-client
-
-
insertRole
public static Role insertRole(Client client, Organization orgProvided, String name, String strUserLevelProvided) throws Exception
- Parameters:
client
- client for which the role will be createdorgProvided
- if null, role inserted for organization with id=0name
- name of the rolestrUserLevelProvided
- if null, user level " CO" will be set to the new role- Returns:
- Role object for new element
- Throws:
Exception
-
insertRole
public static Role insertRole(Client client, Organization orgProvided, String name, String strUserLevelProvided, boolean isClientAdmin) throws Exception
- Parameters:
client
- client for which the role will be createdorgProvided
- if null, role inserted for organization with id=0name
- name of the rolestrUserLevelProvided
- if null, user level " CO" will be set to the new role- Returns:
- Role object for new element
- Throws:
Exception
-
insertRoleOrganization
public static RoleOrganization insertRoleOrganization(Role role, Organization orgProvided) throws Exception
- Parameters:
role
- role for which the organization access information will be createdorgProvided
- if null, organization with id "0" will be used- Returns:
- RoleOrganization object for new element
- Throws:
Exception
-
insertRoleOrganization
public static RoleOrganization insertRoleOrganization(Role role, Organization orgProvided, boolean isOrgAdmin) throws Exception
- Parameters:
role
- role for which the organization access information will be createdorgProvided
- if null, organization with id "0" will be used- Returns:
- RoleOrganization object for new element
- Throws:
Exception
-
insertUser
public static User insertUser(Client client, Organization orgProvided, String name, String password, Role role, Language defaultLanguage) throws Exception
- Parameters:
client
-orgProvided
-name
-password
-role
-defaultLanguage
-- Returns:
- User object
- Throws:
Exception
-
insertUserRole
public static UserRoles insertUserRole(Client client, User user, Organization orgProvided, Role role) throws Exception
- Parameters:
client
-user
-orgProvided
-role
-- Returns:
- UserRoles object for new element
- Throws:
Exception
-
insertUserRole
public static UserRoles insertUserRole(Client client, User user, Organization orgProvided, Role role, boolean isRoleAdmin) throws Exception
- Parameters:
client
-user
-orgProvided
-role
-- Returns:
- UserRoles object for new element
- Throws:
Exception
-
insertUserRoles
public static void insertUserRoles(Client client, User user, Organization organization, Role role) throws Exception
Inserts a new role for the created client and user. Also user Openbravo will have rights to access new client- Parameters:
client
-user
-organization
-role
-- Throws:
Exception
-
insertCalendar
public static Calendar insertCalendar(Client client, Organization orgProvided, String name) throws Exception
- Parameters:
client
-orgProvided
-name
-- Returns:
- Calendar object for new element
- Throws:
Exception
-
insertYear
public static Year insertYear(Client client, Organization orgProvided, Calendar calendar, String strYearName) throws Exception
- Parameters:
client
-orgProvided
-calendar
-strYearName
-- Returns:
- Year object for new element
- Throws:
Exception
-
insertElement
public static Element insertElement(Client client, Organization orgProvided, String name, Tree accountTree, Boolean bNaturalAccount) throws Exception
- Parameters:
client
-orgProvided
-name
-accountTree
-bNaturalAccount
-- Returns:
- Element object for new element
- Throws:
Exception
-
insertElementValue
public static ElementValue insertElementValue(Element element, Organization orgProvided, String name, String value, String description, String accountType, String accountSign, boolean isDocControlled, boolean isSummary, String elementLevel, boolean doFlush) throws Exception
- Parameters:
element
-orgProvided
-name
-value
-description
-accountType
-accountSign
-isDocControlled
-isSummary
-elementLevel
-doFlush
-- Returns:
- ElementValue object for new element
- Throws:
Exception
-
insertElementValue
public static ElementValue insertElementValue(Element element, Organization orgProvided, String name, String value, String description, String accountType, String accountSign, boolean isDocControlled, boolean isSummary, String elementLevel, boolean doFlush, String showValueCond, String titleNode) throws Exception
- Throws:
Exception
-
getTreeNode
public static List<TreeNode> getTreeNode(Tree accountTree, Client client, Organization orgProvided) throws Exception
Returns the nodes of a given tree- Parameters:
accountTree
-client
-orgProvided
-- Returns:
- List<TreeNode> with relation of tree node elements of the provided tree
- Throws:
Exception
-
getTreeNode
public static List<TreeNode> getTreeNode(Tree accountTree, Client client) throws Exception
Returns the nodes of a given tree- Parameters:
accountTree
-client
-- Returns:
- List<TreeNode> with relation of tree node elements of the provided tree
- Throws:
Exception
-
updateAccountTree
public static void updateAccountTree(List<TreeNode> treeNodes, HashMap<String,Long> mapSequence, HashMap<String,String> mapElementValueValue, HashMap<String,String> mapElementValueId, HashMap<String,String> mapParent, boolean doFlush) throws Exception
Sorts the account tree (stored in ADTreeNode) according to the order provided- Parameters:
treeNodes
- relation of nodes in ADTreeNode belonging to the accounting tree to sort outmapSequence
- HashMap<String,Long> where the String belongs to the value of a c_elementvalue, and Long to the sequence that must be assigned to the node that represents that element value in ADTreeNodemapElementValueValue
- each tree node in treeNodes has one entry in mapElementValueId to link it's value with the c_elementvalue_id of that element in c_elementvalue tablemapElementValueId
- stores the link value <-> c_elementvalue_idmapParent
- stores the link value <-> value of the parentdoFlush
- if true, each new update performs a flush in DAL- Throws:
Exception
-
insertOperand
public static ElementValueOperand insertOperand(ElementValue elementValue, ElementValue operand, Long sign, Long sequence) throws Exception
- Parameters:
elementValue
-operand
-sign
-sequence
-- Returns:
- ElementValueOperand object for the inserted element
- Throws:
Exception
-
getElementValue
public static ElementValue getElementValue(Element element, String value) throws Exception
- Parameters:
element
-value
-- Returns:
- ElementValue object for the given value in the provided element
- Throws:
Exception
-
insertAcctSchema
public static AcctSchema insertAcctSchema(Client client, Organization orgProvided, Currency currency, String name, String gAAP, String costingMethod, boolean hasAlias) throws Exception
- Parameters:
client
-orgProvided
-currency
-name
-gAAP
-costingMethod
-hasAlias
-- Returns:
- AcctSchema element that matches provided data
- Throws:
Exception
-
insertAcctSchemaElement
public static AcctSchemaElement insertAcctSchemaElement(AcctSchema acctSchema, Organization orgProvided, List listElement, Long sequence, boolean isMandatory, boolean isBalanced, ElementValue defaultAccount, Element accountingElement) throws Exception
- Parameters:
acctSchema
-orgProvided
- optional parameter. If null, organization 0 will be usedlistElement
- element of the reference list which is going to be inserted. From it's name, the name of the acct.schema element will be taken, and from it's value (search key) the typesequence
-isMandatory
-isBalanced
-defaultAccount
-accountingElement
-- Returns:
- AcctSchemaElement object for the inserted element
- Throws:
Exception
-
insertAcctSchemaDefault
public static AcctSchemaDefault insertAcctSchemaDefault(HashMap<String,ElementValue> defaultElementValues, AcctSchema acctSchema) throws Exception
- Parameters:
defaultElementValues
- map with DefaultAccount and ElementValue object that will be setacctSchema
-- Returns:
- AcctSchemaDefault object for the created element
- Throws:
Exception
-
insertAcctSchemaGL
public static AcctSchemaGL insertAcctSchemaGL(HashMap<String,ElementValue> defaultElementValues, AcctSchema acctSchema) throws Exception
- Parameters:
defaultElementValues
- map with DefaultAccount and ElementValue object that will be setacctSchema
-- Returns:
- AcctSchemaGL object for the created element
- Throws:
Exception
-
insertOrgAcctSchema
public static OrganizationAcctSchema insertOrgAcctSchema(Client client, AcctSchema acctSchema, Organization orgProvided)
- Parameters:
client
-acctSchema
-orgProvided
-- Returns:
- OrganizationAcctSchema object for the new element
-
insertCategory
public static GLCategory insertCategory(Client client, Organization organization, String name, String categoryType, boolean isDefault)
- Parameters:
client
-organization
-name
-categoryType
-isDefault
-- Returns:
- GLCategory object for the new element
-
insertSequence
public static Sequence insertSequence(Client client, Organization organization, String name, Long startNo)
- Parameters:
client
-organization
-name
-startNo
-- Returns:
- Sequence object for the new created element
-
insertDocType
public static DocumentType insertDocType(Client client, Organization organization, String name, String printName, String docBaseType, String docSubTypeSO, DocumentType shipment, DocumentType invoice, boolean isDocNoControlled, Sequence sequence, GLCategory category, boolean isSOTrx, Table table)
- Parameters:
client
-organization
-name
-printName
-docBaseType
-docSubTypeSO
-shipment
-invoice
-isDocNoControlled
-sequence
-category
-isSOTrx
-table
-- Returns:
- DocumentType object for the new element
-
insertReferenceData
public static ImportResult insertReferenceData(DataSet dataset, Client client, Organization orgProvided) throws Exception
Given a dataset, inserts the elements in the xml file into database.- Parameters:
dataset
-client
-orgProvided
-- Returns:
- ImportResult object for the created element. Errors, warnings and log is provided in this object.
- Throws:
Exception
-
getDatasetContent
public static String getDatasetContent(DataSet dataset) throws IOException
- Throws:
IOException
-
insertDoctypeTemplate
public static DocumentTemplate insertDoctypeTemplate(DocumentType document, String name, String templateLocation, String templateFileName, String reportFileName)
- Parameters:
document
-name
-templateLocation
-templateFileName
-reportFileName
-- Returns:
- DocumentTemplate object with the new element
-
insertEmailTemplate
public static EmailTemplate insertEmailTemplate(DocumentTemplate documentTemplate)
- Parameters:
documentTemplate
-- Returns:
- EmailTemplate object for the new element
-
getCOAModules
public static List<Module> getCOAModules(String strModules) throws Exception
Returns the set of Module objects for the given ids- Parameters:
strModules
- relation of ids (in a format so that can be included in a "in" statement of a "where" clause- Returns:
- List<Module> with the relation of modules
- Throws:
Exception
-
getRDModules
public static List<Module> getRDModules(String strModules) throws Exception
Returns the set of Module objects for the given ids- Parameters:
strModules
- relation of ids (in a format so that can be included in a "in" statement of a "where" clause- Throws:
Exception
-
getDataSets
@Deprecated public static List<DataSet> getDataSets(Module module, String accessLevel) throws Exception
Deprecated.- Parameters:
module
-accessLevel
- 3-> client/org; 1-> organization only- Returns:
- List<DataSet> with the relation of DataSet objects
- Throws:
Exception
-
getDataSets
public static List<DataSet> getDataSets(Module module, List<String> accessLevel) throws Exception
Given a module, and an access level, returns all the datasets contained in that module- Parameters:
module
-accessLevel
- 3-> client/org; 6-> System/client- Returns:
- List<DataSet> with the relation of DataSet objects
- Throws:
Exception
-
getAcctSchemaElements
public static List<List> getAcctSchemaElements() throws Exception
Returns the relation of ad_ref_list elements for the reference with AD_Reference_id='181' (Acct.schema elements)- Returns:
- List<org.openbravo.model.ad.domain.List> with the relation of ad_ref_list elements
- Throws:
Exception
-
insertOrgModule
public static ADOrgModule insertOrgModule(Client client, Organization orgProvided, Module module) throws Exception
- Parameters:
client
-orgProvided
- optional parameter. If not provided, "*" organization usedmodule
-- Returns:
- ADClientModule object with the created element
- Throws:
Exception
-
insertClientModule
public static ADClientModule insertClientModule(Client client, Module module) throws Exception
- Parameters:
client
-module
-- Returns:
- ADClientModule object with the created element
- Throws:
Exception
-
existsOrgName
public static boolean existsOrgName(Client client, String strOrgName) throws Exception
- Throws:
Exception
-
insertOrganization
public static Organization insertOrganization(String strOrgName, OrganizationType orgType, String strcLocationId, Client client) throws Exception
- Throws:
Exception
-
insertOrganization
public static Organization insertOrganization(String strOrgName, OrganizationType orgType, String strcLocationId, Client client, Currency strCurrency) throws Exception
- Throws:
Exception
-
getTreeNode
public static TreeNode getTreeNode(Organization org, Tree tree, Client client) throws Exception
- Throws:
Exception
-
updateOrgTree
public static void updateOrgTree(Tree tree, TreeNode orgNode, Organization parentOrg) throws Exception
- Throws:
Exception
-
updateOrgLocation
public static void updateOrgLocation(Organization org, Location location) throws Exception
- Throws:
Exception
-
getTranslatedColumnName
public static String getTranslatedColumnName(Language language, String columnName)
-
getTranslatedElement
public static String getTranslatedElement(Language language, String columnName, String elementName)
-
getTree
public static Tree getTree(String strTreeTypeMenu, Client client, Organization orgProvided) throws Exception
Returns the tree of the provided type- Parameters:
strTreeTypeMenu
- two letters corresponding to the tree type for the menu- Returns:
- Tree menu element (defined at system level)
- Throws:
Exception
-
-