Get permissions mas of a group over this category
If there is no explicit permissions mask set at k_x_cat_group_acl for given
group and this category, then the category hierarchy is scanned upwards and
the permissions of the closest parent are assumed to be the ones of this category.

getPath

Calls k_sp_get_cat_path.
Category parents are found and each parent name is extracted.
Then parent names are contenated in order separated by slash '/' characters.
This method is usefull when creating a physical directory path for files
belonging to Products contained in a Category. This way the directory paths can
mimmic the category tree structure.

delete

First delete all Products and Companies contained in Category, including
physical disk files associted with Products and Company attachments.
Then call k_sp_del_category_r stored procedure and perform recursive
deletion of all childs.

getUserPermissions

Calls k_sp_cat_usr_perm stored procedure.
User permissions are those granted directy to user plus those grants
indirectly by assigning permisssion to a group witch the user belongs to.
Permissions are accumulative; a user gains new permissions by belonging to
new groups. All permissions are of grant type, there are no deny permissions.

getGroupPermissions

If there is no explicit permissions mask set at k_x_cat_group_acl for given
group and this category, then the category hierarchy is scanned upwards and
the permissions of the closest parent are assumed to be the ones of this category.
If no parent has explicit permissions set for given group then return value is zero.

Copy a directory and index all its files as products inside this Category

Parameters:

oConn - JDCConnection Any pending transaction on given connection will be commited.
This methods calls Connection.commit() on oConn object,
so AutoCommit status for connection must be set to true before calling uploadDirectory()

sCategoryId - GUID of Category to store or null if it is a new Category.

sParentId - GUID of Parent Category or null if it is a root category.

sCategoryName - Internal Category Name. It is recommended that makeName()
method is applied always on sCategoryName. Because category names are often used for composing
physical disk paths, assigning characters such as '*', '/', '?' etc. to category names may
lead to errors when creating directories for contained Products. As a general rule use ONLY
upper case letters and numbers for category names.

iIsActive - 1 if category is to be marked active, 0 if it is to be marked as unactive.

delete

First delete all Products and Companies contained in Category, including
physical disk files associted with Products and Company attachments.
Then call k_sp_del_category_r stored procedure and perform recursive
deletion of all childs.

makeName

Because nm_category is a primary key for table k_categories and because
category names are used for composing physical disk paths, some special
rules must be followed when assigning category names.

First a Category Name MUST NOT containing any character not allowed in a directory name.

Second a Category Name MUST be unique for all categories at all WorkAreas.

Parameters:

oConn - Database Connection

sCategoryNm - String to be used as a guide for making category name.

Returns:

The input string truncated to 18 characters and transformed to upper case.
Method Gadgets.ASCIIEncode() is applies and spaces, commas, asterisks, slashes,
backslashes and other characters are removed or substituted.
Finally an 8 decimals integer tag is appended to name for making it unique.
For example "Barnes & Noble" is transormed to "BARNES_A_NOBLE~00000001"