If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Adding Folder to Deployment Export

Started by Jayson.A, 11 Jun 2013 12:20:48 PM

Previous topic - Next topic

Jayson.A

Hello,

I'm having trouble adding a folder to an export job. I can add packages but not folders.

Here is a copy of the code setting the deployment options. But i dont see the option for which folders to include.



private deploymentOption[] deploymentOptionsFolders(string pArchiveName, string pPassword)
        {
            int i = 5;  //number of deployment options to be set
            if (pPassword != null && pPassword.Length >= 1)
                i++;

            deploymentOption[] opt = new deploymentOption[i];
            string archive = pArchiveName;


            deploymentOptionString doStr = new deploymentOptionString();
            doStr.name = deploymentOptionEnum.archive;
            doStr.value = archive;
            opt[--i] = doStr;


            if (pPassword != null && pPassword.Length >= 1)
            {
                deploymentOptionString archiveEncryptPassword = new deploymentOptionString();
                archiveEncryptPassword.value = "<credential><password>" + pPassword + "</password></credential>";
                archiveEncryptPassword.name = deploymentOptionEnum.archiveEncryptPassword;
                opt[--i] = archiveEncryptPassword;
            }
            multilingualString deploymentName = new multilingualString();
            deploymentName.locale = "en-us";
            deploymentName.value = archive;

            deploymentOptionMultilingualString doms = new deploymentOptionMultilingualString();
            doms.name = deploymentOptionEnum.deploymentName;
            doms.value = new multilingualString[] { deploymentName };
            opt[--i] = doms;

            int j = foldercontent.Count;
            deploymentOptionPackageInfo pack = new deploymentOptionPackageInfo();
            packageDeploymentInfo[] pDeplInfo = new packageDeploymentInfo[j];

            for (int k = 0; k < j; k++)
            {
                multilingualToken[] mt = new multilingualToken[1];
                mt[0] = new multilingualToken();
                mt[0].locale = "en";
                mt[0].value = foldercontent[k].ToString();
                pDeplInfo[k] = new packageDeploymentInfo();
                pDeplInfo[k].sourceName = mt;
                pDeplInfo[k].targetName = mt;
                pDeplInfo[k].enabled = true;
            }

            pack.name = deploymentOptionEnum.package;
            pack.value = pDeplInfo;
            opt[--i] = pack;

            deploymentOptionBoolean overwrite = new deploymentOptionBoolean();
            overwrite.name = deploymentOptionEnum.archiveOverwrite;
            overwrite.value = true;
            opt[--i] = overwrite;

            deploymentOptionBoolean personalData = new deploymentOptionBoolean();
            personalData.name = deploymentOptionEnum.personalDataSelect;
            personalData.value = true;
            opt[--i] = personalData;

            return opt;
        }