accessing configuration parameters using ODM Decision Center API - ibm-odm

If I create a custom configuration parameter using Decision Center > Configure > Installation Settings Wizard > Step 5: Set Configuration Parameters > New ... custom parameter, how can I access that custom parameter key/value using the Decision Center API?

Custom parameters can be accessed using the following approach:
ManagerBean managerBean= ManagerBean.getInstance();
IlrSession session = managerBean.getSession();
String value = IlrSettings.getGlobalSetting(session, "key");

Related

how to set default application version in azure batch using java sdk

Is there a way to set the default application version in azure batch account using java sdk?
The sample script that they have in the git does not show how to set the default version(https://github.com/Azure-Samples/batch-java-manage-batch-accounts/blob/master/src/main/java/com/microsoft/azure/management/batch/samples/ManageBatchAccount.java).
Also I was trying to dig in the interface(https://github.com/Azure/azure-libraries-for-java/blob/master/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/Application.java) to get some clues but couldn't see anything that supports updating the default version.
UPDATE:
I was able to get the version update working following #brklein suggestion:
BatchApplication batchApplication = batchAccount.applications().get(applicationName)
ApplicationTokenCredentials credentials = new ApplicationTokenCredentials(applicationId, tenantId, appSecret, AzureEnvironment.AZURE)
BatchManager batchManager = BatchManager.authenticate(credentials, subscriptionId)
ApplicationsInner applicationsInner = batchManager.inner().applications()
ApplicationUpdateParameters parameters = new ApplicationUpdateParameters(defaultVersion: DEFAULT_APP_VERSION)
applicationsInner.update(resourceGroupName, batchAccountName, batchApplication.id(), parameters)
It does not appear that default version is being surface at the client layer of the SDK.
To get around this you should be able to call the implementation methods manually, which have the full functionality of the REST API (as they are auto-generated).
To do this create either CreateApplicationParameters or ApplicationUpdateParameters and set the defaultVersion property. Then you can call the implementations create or update methods manually (https://github.com/Azure/azure-libraries-for-java/blob/78e8ff2940eba34bc63f8e7be6807a377500f5c7/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/ApplicationsInner.java#L474).

Injecting agent properties into HTTP headers

I have an SSO setup using OpenAM 13.5 protecting an application on IIS with an IIS Web Agent.
The application receives user/session attributes by mapping the appropriate properties in the Agent configuration - everything is working fine, however I'd like to take things a step further: I'd like to pass the application a few agent properties as HTTP headers - i.e.:
CUSTOM-LOGIN-URL = com.sun.identity.agents.config.login.url
CUSTOM-EDITPASSWORD-URL = (set by a custom agent property)
CUSTOM-EDITPROFILE-URL = (set by a custom agent property)
CUSTOM-LOGOUT-URL = com.sun.identity.agents.config.logout.url
CUSTOM-GOTO-PARAMETER-NAME = com.sun.identity.agents.config.redirect.param
This way I could avoid hardwiring the application to the specific SSO config details.
Do you have any idea on how I could achieve that, possibly without writing code?
That's not possible OOTB. It might be possible by implementing https://backstage.forgerock.com/docs/openam/13.5/apidocs/com/sun/identity/entitlement/ResourceAttribute.html
Please see https://backstage.forgerock.com/docs/openam/13.5/dev-guide/#sec-policy-spi

How to instantiate a blank workspace in node red?

I have an < iframe > based Node-Red UI hosted inside MEAN application. I want to create a blank workspace each time I visit the Node-Red hosted Page without restarting NR server?
But I also need to preserve the previously deployed flows.
I've tried changing user directory to scratch :
var settings = {
httpAdminRoot:"/red/",
httpNodeRoot: "/api/",
userDir:"/home/sudo/.nodered/scratch",
functionGlobalContext: { } // enables global context
};
but it wouldn't work instead it started creating persistent flow file inside the scratch directory.
You can't do what you want with the default Node-RED. It will always store the flow in a file in the userDir
You will need to look at implementing your own storage module as described here: http://nodered.org/docs/api/storage/

How do I configure an existing website or create a new one in WiX?

I'm creating a wix installer to install multiple web applications, I give the user the option to select an existing website or create a new one. So far, I have implemented the user interface and queried the IIS for the existing websites, but the problem is that I don't know how to configure these two options. I tried using conditional components where I check for a property I set in a custom action but the issue with this scenario is that I end up placing the website element inside a component which I don't want to do in case the user chose an existing website(to avoid it from getting deleted on uninstall)..I found solutions on the web for installing to an existing website or creating a new one but never the both..Can anyone help me with this?
You can create Custom action for that and set the result of it to wix property.
string result ;
session["RESULT"] = result;
then in your wxs :
<Custom Action="InstallWebsite" After='InstallFinalize'>NOT Install AND (<![CDATA[RESULT<>"Existing"]]>)</Custom>
You can create Custom action for that and set the result of it to wix property.
string result ;
session["RESULT"] = result;
then in your wxs :

Programatically filter web content by scope in Liferay 6.2.GA2

Updating to have more info:
Is there any way to programatically select all the web content from global scope or currently selected site scope.
I want to do this in velocity template "portal_normal.vm". I wrote "$themeDisplay.getScopeGroupId().toString()" to get group id.
I have 2 sites/communities and I have assigned one user to each of them. One site is default liferay site which has default liferay user.Other site is my custom site and has my own user. When I try to login with each of them ,I always get group id of liferay site.Is there any other method I need to use to get site of current logged in user?
You must allow the usage of ServiceLocator in your Velocity templates. In your portal-ext.properties set the following:
journal.template.velocity.restricted.variables=
If you already have these keys set, just remove serviceLocator from the list.
Using serviceLocator we can load GroupLocalServiceUtil and JournalArticleLocalServiceUtil. Its very simple to obtain all the sites WebContent:
#set ($journal_article_local_service = $serviceLocator.findService("com.liferay.portal.service.JournalArticleLocalService"))
#set ($journal_articles = $journal_article_local_service.getArticles($theme_display.getScopeGroupId()))
To get all the ones in the global scope:
For the global group:
#set ($group_local_service = $serviceLocator.findService("com.liferay.portal.service.GroupLocalService"))
#set ($global_group = $group_local_service.getGroup($theme_display.getCompanyId(), "Global"))
#set ($journal_article_local_service = $serviceLocator.findService("com.liferay.portal.service.JournalArticleLocalService"))
#set ($journal_articles = $journal_article_local_service.getArticles($global_group.getGroupId()))

Resources