This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH PORTAL_REGISTRY (PORTAL_NAME, PORTAL_REFTYPE, PORTAL_OBJNAME, PORTAL_LABEL, PORTAL_URI_SEG1, PORTAL_URI_SEG2, PORTAL_URI_SEG3, PATH) AS ( | |
SELECT P.PORTAL_NAME | |
, P.PORTAL_REFTYPE | |
, P.PORTAL_OBJNAME | |
, P.PORTAL_LABEL | |
, PORTAL_URI_SEG1 | |
, PORTAL_URI_SEG2 | |
, PORTAL_URI_SEG3 | |
, P.PORTAL_LABEL AS PATH | |
FROM PSPRSMDEFN P |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM PSPRSMSYSATTRVL | |
WHERE PORTAL_ATTR_NAM LIKE 'CN%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT PORTAL.PORTAL_NAME | |
, PORTAL.PORTAL_OBJNAME | |
, PROJ.OBJECTVALUE1 PNLGRPNAME | |
, PROJ.OBJECTVALUE2 MARKET | |
, EVT.PTCS_SERVICEID | |
, ISCOMP_LABEL.XLATLONGNAME /*EVT.PTCS_ISCOMPSERVICE*/ | |
, PROCSEC_LABEL.XLATLONGNAME PROC_SEQ | |
, ( /* nested instead of join since this field might be empty */ | |
SELECT XLAT.XLATLONGNAME | |
FROM PSXLATITEM XLAT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT USR.ROLEUSER | |
FROM PSROLEUSER USR | |
WHERE EXISTS ( | |
SELECT DISTINCT ROL.ROLENAME | |
FROM PSROLECLASS ROL | |
WHERE EXISTS ( | |
SELECT DISTINCT AUTH.CLASSID | |
FROM PSAUTHITEM AUTH | |
INNER JOIN PSMENUITEM MENU | |
ON AUTH.BARITEMNAME = MENU.ITEMNAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// endsWith polyfill | |
if (!String.prototype.endsWith) { | |
String.prototype.endsWith = function(searchString, position) { | |
var subjectString = this.toString(); | |
if (typeof position !== 'number' || !isFinite(position) || | |
Math.floor(position) !== position || | |
position > subjectString.length) { | |
position = subjectString.length; | |
} | |
position -= searchString.length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local string &script; | |
Local JavaObject &manager = CreateJavaObject("javax.script.ScriptEngineManager"); | |
Local JavaObject &engine = &manager.getEngineByName("JavaScript"); | |
SQLExec("SELECT CONTDATA FROM PSCONTENT WHERE CONTNAME = :1", HTML.JSM_READ_XLS_JS, &script); | |
REM ** Tell JavaScript what file to process; | |
&engine.put("fileName", "c:/temp/roles.xlsx"); | |
&engine.eval(&script); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local JavaObject &jsonRole = CreateJavaObject("org.json.JSONObject"); | |
Local JavaObject &jsonPerms = CreateJavaObject("org.json.JSONArray"); | |
Local string &roleName = "Compensation Administrator"; | |
Local string &roleDescr; | |
Local string &permId; | |
Local string &jsonStr; | |
Local SQL &perms; | |
REM ** Create JSON structure...; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local JavaObject &jsonRole = CreateJavaObject("org.json.JSONStringer"); | |
Local string &roleName = "Compensation Administrator"; | |
Local string &roleDescr; | |
Local string &permId; | |
Local string &jsonText; | |
Local SQL &perms; | |
REM ** Create JSON structure...; | |
SQLExec("SELECT DESCR FROM PSROLEDEFN WHERE ROLENAME = :1", &roleName, &roleDescr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local JavaObject &jsonStr = CreateJavaObject("java.lang.String", &jsonText); | |
Local JavaObject &constructorArgTypes = CreateJavaObject("java.lang.Class[]", &jsonStr.getClass()); | |
rem Local JavaObject &jsonClass = GetJavaClass("org.json.JSONObject"); | |
rem Local JavaObject &constructor = &jsonObject.getClass().getConstructor(&constructorArgTypes); | |
Local JavaObject &jsonClass = CreateJavaObject("org.json.JSONObject").getClass(); | |
Local JavaObject &constructor = &jsonClass.getConstructor(&constructorArgTypes); | |
Local JavaObject &parserObject = &constructor.newInstance(CreateJavaObject("java.lang.Object[]", &jsonStr)); | |
Local JavaObject &roleJson = &jsonClass.cast(&parserObject); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = (function() { | |
var ReflectiveArray = java.lang.reflect.Array; | |
var SQLExec = Packages.PeopleSoft.PeopleCode.Func.SQLExec; | |
var CreateSQL = Packages.PeopleSoft.PeopleCode.Func.CreateSQL; | |
var parms = ReflectiveArray.newInstance(java.lang.Class.forName("java.lang.Object"), | |
2 /* number of selected columns */); | |
var columns = ReflectiveArray.newInstance(java.lang.Class.forName("java.lang.Object"), | |
1 /* number of selected columns */); | |
parms[0] = roleName; |
OlderNewer