Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Web Services

Reply
Contributor
BeSeWe
Posts: 17
Registered: ‎06-05-2012
My Device: Bold 9900
My Carrier: T-Mobile Germany
Accepted Solution

Is it possible to add an application to a SoftwareConfiguration over BWS

Hi,

 

I have a question is it possible to add an application to a SoftwareConfiguration over th BWS?

I have found some function, but they don't work.

 

GetSWConfigsRequest request = new GetSWConfigsRequest();
		   request.setMetadata(_meta);

		   //get all SWConfigs
		   request.setName("SC_Sample_APP");
		   request.setLoadApplicationSettings(true);
		   request.setLoadDeviceSettings(true);

		   GetSWConfigsResponse response = _myCoreWSStub.getSWConfigs(request);
		   if (response.getReturnStatus().getCode().compareTo("SUCCESS") != 0){    
		       System.out.println("Error occurred: " + response.getReturnStatus().getMessage());
		   }

		   for (SWConfig itr: response.getSwConfigs()) {
		       if (itr.getLocaleNameAndDescription() == null) {
		           continue;
		       }
		       for (LocaleNameAndDescription localeNameAndDesc: itr.getLocaleNameAndDescription()) {
		           if (_meta.getLocale().equalsIgnoreCase(localeNameAndDesc.getLocale())) {
		               System.out.println(localeNameAndDesc.getName());
		               break;
		           }
		       }
		       ApplicationSettings applicationSettings = new ApplicationSettings();
		       applicationSettings.setApplication(getSWConfigApplications());
		       ObjectDeliveryMode deliveryMode = new ObjectDeliveryMode();
		       deliveryMode.setPUSH(true);
		       applicationSettings.setObjectDeliveryMode(deliveryMode);
		       DeliveryTransportType deliveryTransportType = new DeliveryTransportType();
		       deliveryTransportType.setWIRELESS(true);
		       applicationSettings.setObjectDeliveryTransport(deliveryTransportType);
		       ApplicationDisposition applicationDisposition = new ApplicationDisposition();
		       applicationDisposition.setALLOWEDANDREQUIRED(true);
		       applicationSettings.setSelectedApplicationDisposition(applicationDisposition);
		       ApplicationControlPolicyType applicationControlPolicyType = new ApplicationControlPolicyType();
		       applicationControlPolicyType.setAPPLICATION(true);
		       applicationSettings.setSelectedApplicationControlPolicyType(applicationControlPolicyType);
		       itr.getApplicationSettings().add(applicationSettings);
		       System.out.println(itr.getApplicationSettings().get(0).getSoftwareConfigurationApplicationKey());
		       System.out.println(itr.getApplicationSettings().get(0).getObjectDeliveryTransport().getValue());
		       System.out.println(itr.getApplicationSettings().get(0).getSelectedApplicationControlPolicyType().getValue());
		       System.out.println(itr.getApplicationSettings().get(0).getSelectedApplicationDisposition().getValue());
		       System.out.println(itr.getApplicationSettings().get(0).getApplicationControlPolicy().getOrganizationUid());
				
		   }

 Thanks in advance.

 

Benjamin

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Is it possible to add an application to a SoftwareConfiguration over BWS

Hi Benjamin,

 

No this is currently not supported. In your code you are modifying the client-side objects but are not triggering any change on the BAS, what needs to be added is a call in BWS to specifically add applications.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
BeSeWe
Posts: 17
Registered: ‎06-05-2012
My Device: Bold 9900
My Carrier: T-Mobile Germany

Re: Is it possible to add an application to a SoftwareConfiguration over BWS

Hi Garett,

 

first thanks for the answer.

Can you say me if there is any function in planing within the next releases?

 

Thanks in advance.

 

Benjamin

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Is it possible to add an application to a SoftwareConfiguration over BWS

I can't say for sure. THis has been asked for in the past so the internal developers are aware of the request. I would recommend keeping watch of the newest BWS releases.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
BeSeWe
Posts: 17
Registered: ‎06-05-2012
My Device: Bold 9900
My Carrier: T-Mobile Germany

Re: Is it possible to add an application to a SoftwareConfiguration over BWS

Hi Garett,

 

thanks this sounds good.

I'm also need a BWS function to define and add an Application Policy. ;-)

Is it possible that if you watch the newest BWS release to look also for such an function?

 

Thanks in advance.

 

Benjamin

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Is it possible to add an application to a SoftwareConfiguration over BWS

That's where all new functions will be listed when added.
Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
BeSeWe
Posts: 17
Registered: ‎06-05-2012
My Device: Bold 9900
My Carrier: T-Mobile Germany

Re: Is it possible to add an application to a SoftwareConfiguration over BWS

Hi Garett,

 

Is it possible that a part of oyur last post got lost?

 

Thanks a lot.

 

Benjamin

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Is it possible to add an application to a SoftwareConfiguration over BWS

Could you clarify what you think may have been lost? You asked if another new feature may be added in the next release, I can't mention when new features may be released so said to watch the released documentation to see what new features are available.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
BeSeWe
Posts: 17
Registered: ‎06-05-2012
My Device: Bold 9900
My Carrier: T-Mobile Germany

Re: Is it possible to add an application to a SoftwareConfiguration over BWS

Sorry, with lost I have mean the link to the released document.

Please use plain text.