Skip to content

Instantly share code, notes, and snippets.

View floverfelt's full-sized avatar
😀

floverfelt

😀
View GitHub Profile
// Required format for task
List<List<String>> allDbRoles = Collections.singletonList((Collections.singletonList(dbRoleId)));
String connDetails = DSSXMLClassFactory.getServerSessionInstance().getAppSchemaServer()
.GetDBRoleInfo(webIServerSession.getSessionID(), null, (String) null, (String) null, allDbRoles, null);
@floverfelt
floverfelt / Main.java
Created October 17, 2020 12:27
Creating an iServerSession with MSTR Web SDK
private static WebIServerSession getAdminWebIServerSession(String mstrServerName, int mstrServerPort, String mstrProjectName, String mstrUsername,
String mstrPassword) throws WebObjectsException {
WebIServerSession webIServerSession = WebObjectsFactory.getInstance().getIServerSession();
// Spawn adminSession for work
webIServerSession.setServerName(mstrServerName);
webIServerSession.setServerPort(mstrServerPort);
webIServerSession.setProjectName(mstrProjectName);
webIServerSession.setLogin(mstrUsername);
@floverfelt
floverfelt / cmdline
Created October 18, 2020 15:58
Installing MSTR war locally
mvn install:install-file -Dfile=112U2.war -DgroupId=mstr -DartifactId=mstr-war -Dversion=1.0 -Dpackaging=war
@floverfelt
floverfelt / pom.xml
Created October 18, 2020 17:13
local-war-parent pom sample
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>local.mstr.war</groupId>
<artifactId>local-war-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
@floverfelt
floverfelt / pom.xml
Created October 18, 2020 17:14
pom of the local-war build
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>local-war-parent</artifactId>
<groupId>local.mstr.war</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@floverfelt
floverfelt / pom.xml
Created October 18, 2020 17:16
pom of local-war plugin1
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>local-war-parent</artifactId>
<groupId>local.mstr.war</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
password=
password=
secret=
var variable1 = 1;
var variable2 = 2;
function add() {
return variable1 + variable2;
}
console.log('The result of add(): ' + add());
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>local-war-parent</artifactId>
<groupId>local.mstr.war</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>