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

Author Topic: Get Search Path of Deployment Object  (Read 5890 times)

Offline manias

  • Full Member
  • ***
  • Join Date: Apr 2014
  • Posts: 22
  • Forum Citizenship: +0/-0
Get Search Path of Deployment Object
« on: 02 Dec 2016 03:04:52 am »
Good day!
I work with Import_Partial_Whole.java sample from IBM and try to set deployment package path (in /adminFolder) same as in public folder.
For this i using method getPubFolderContent which returned me an deploymentObject StoreID, but i need extract searchPath:
Code: [Select]
public HashMap getPubFolderContent(String myArchive )
{

Option[] deployOptEnum = new Option[] {};
HashMap arrOfPublicFolder = new HashMap();
   
try {

deployOptEnum = cmService.getDeploymentOptions( myArchive, new Option[] {});

int deployOptionLength = deployOptEnum.length;
System.out.println(deployOptionLength);

       // sn_dg_sdk_method_contentManagerService_getDeploymentOptions_end_0
for (int i = 0; i < deployOptEnum.length; i++) {
if (deployOptEnum[i].getClass().getName() == DEPLOY_OPTION_NAME) {

DeploymentObjectInformation[] packDeployInfo = ((DeploymentOptionObjectInformationArray) deployOptEnum[i])
.getValue();
int packLen = packDeployInfo.length;


for (int j = 0; j < packLen; j++) {
    String packFolderName=packDeployInfo[j].getDefaultName();
    System.out.println("\nImporting Package: " + packFolderName);
   
    SearchPathSingleObject packagePath=packDeployInfo[j].getSearchPath();
    System.out.println("\nImporting Package: " + packagePath);
    arrOfPublicFolder.put(packFolderName, packagePath);
}
}
if (deployOptEnum[i].getClass().getName() != DEPLOY_OPTION_NAME) {
System.out.println(deployOptEnum[i].getClass().getName());
}
}
} catch (RemoteException e) {
System.out
.println("An error occurred in getting Deployment options."
+ "\n" + "The error: " + e.getMessage());
e.printStackTrace();
}
packageInformation=new HashMap(arrOfPublicFolder);

return arrOfPublicFolder;
} //getPubFolderContent

extracting search path we indicated in the following lines:

Code: [Select]
SearchPathSingleObject packagePath=packDeployInfo[j].getSearchPath();
System.out.println("\nImporting Package: " + packagePath);

but method still returnes me storeID.

Maybe someone work with this method and can explain which options i need to change for retrieve searchPath from my deployment object?

Thanks!
« Last Edit: 02 Dec 2016 07:48:13 am by manias »

Offline manias

  • Full Member
  • ***
  • Join Date: Apr 2014
  • Posts: 22
  • Forum Citizenship: +0/-0
Re: Get Search Path of Deployment Object
« Reply #1 on: 29 Dec 2016 02:54:13 am »
So, us i understand, StoreID returned by this method is deployment archive StoreID, not incoming items (reports).

I explore simple deployment archive with 3 reports, and what store in deployment xml. files:

1. content.xml - store StoreID of deployment archive with path to exporting folders
2. package1.xml - store StoreID of deployment archive and incoming items (reports)

Can someone explain:
1. For which needs used StoreID of deployment archive? When i try to create link to StoreID of deployment archive, CC says me that this StoreID is not used, and CC can't find item with this StoreID
2. How i can access to StoreID of  incoming items (reports) in package1.xml file ?

Maybe someone explore this situation.

Many thanks!
Egor.