Skip to Content.
Sympa Menu

grouper-users - [grouper-users] example java code to run a bit of gsh script/JEXL?

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] example java code to run a bit of gsh script/JEXL?


Chronological Thread 
  • From: "Black, Carey M." <>
  • To: "" <>
  • Subject: [grouper-users] example java code to run a bit of gsh script/JEXL?
  • Date: Mon, 23 Jul 2018 15:47:30 +0000
  • Accept-language: en-US
  • Authentication-results: spf=pass (sender IP is 128.146.138.9) smtp.mailfrom=osu.edu; internet2.edu; dkim=pass (signature was verified) header.d=osu.edu;internet2.edu; dmarc=pass action=none header.from=osu.edu;
  • Authentication-results-original: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:9VyO1hfbmxOU+FItUiNJsm5klGMj4u6mDksu8pMizoh2WeGdxcSyYx7h7PlgxGXEQZ/co6odzbaO7ea4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahYL5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM38H/ZhNFsjKxVoxyhpgBwzYHbb4yOKPp+Z7/Rcc8GSWZdQMpcUTFKDIOmb4sICuoMJehUopT5p1QUsRS+BhGgD/7xxzBSnH/5w6072PkmHw3c0gArAtUDv2/QrNrvKKgSUvq5wLTWwTjNdP5W3iz96JXSfh8/vP6MQKt9fMzMwkcsDwPIlkicpZDqMj+P2ekAsXKX4uV8We61lmIrtR99riCyysothYTFnJ8ZxkzG+Clj3oo4Kty1RFRmbdOrEZZcry+aOJV1T88+RmxlvTg1x7IHtJKleSUHy48oyADQZvGCfIWF4Q/sWeWULDtlhX9oeKiwihCv+ka60OL8TNO70FNSoypFjNbMsncN2gTL5MWbTfVx4kms1S+R2g7K9+1IOEc0mrHFJJI7xb4wi4YTvl/EHi/rnkX5kbWadl0++uiv9+TofKnppoOdN49zjAHyKKMumtGjAeQ8NQgOWGub9f6g273k+E31WLRKjvsonanFqJ3WONgXq6GjDwJa0Isv8RmyAyu83NgFg3ULMkpJeBedgIjoP1HOLur4DfC6g1m0izhrw+rJMaHiApnXM3TPjrnscK16605H1Qo/185Q6I9JCr0ZOvL8RlfxtMDEDh8+KwG0zPznCNJg1oMGR22PGLaVML7JsVCW/OIvOPKBZIsUuDbmN/gl/ODigWU4mV8bYammw4EXaHamEfR6PUmVe2TjjcocETRCgg1rBuPwj0CaXCQWem2/RbkU5zcnBZigAJuZAI2hnfbJiCihGYBOa3oDF0uBC2zAdoOYVu0KZT7IZMJtj2pXe6KmTtpr/xWnvwy+g5FuNOfFsghe/9q33tx87O6VzEtp3TtvEoKQ33zbHDI8pX8BWzJjhPM3mkd60FrWifIi0fVFCdxe4e9IWQ4mNJnaivZ3EM32RhmYL4/bU06oF82vGip5Dsk8xdMDeQ5cI52jlViahXrsWuNL0eXQVNpls8e+l2P0O947zn/H0Kc7iFxzRdBSc2Cqm/039g7PCpTPnlnD0aumaPdU0C3M8TKbxHGV9AFDUQF2WLnYR31XeULN5cr0/ELMTrKiSNFFegtMwMKPMO1GP9rykBNLSOqwOdLCbni3lnvqQxuE2+DEYI/jYW5IxCzGEwANmBwS+nDTMw84C2+hrmvSASYoG0joZhbr6vQ4pX+mHUI=
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

All,

I have a use for having files of gsh scripts to do things like:
Establish/maintain custom:
Attributes Defs / AttributeName(s)
Folder structure
Groups
Permissions on folders/groups
Etc....

However, I would also like to be able to embed/use those things
inside other Java code. (hooks, changelog consumer, etc...)

So I am looking for a Java code example for the following:
1) read a file from the file system (a gsh script) and "execute it".
2) use a gsh script as an "condition" ( AKA: if the script returns
"true" then keep running the java code )
Maybe this would be better done as a JEXL expression?


I have yet to have some time to spend on this, and I suspect the code already
exists. I hope someone can point me at it. :)
I am guessing the example would be how gsh starts up and runs a file
would be one place.
And I am guessing the JEXL is "all over the place" in the code too.

Any thoughts on the performance costs of "running a gsh script" vs evaluating
JEXL expressions?

But maybe I am going about initialization type functions the hard way?
Are there other facilities for this general kind of function?

--
Carey Matthew




Archive powered by MHonArc 2.6.19.

Top of Page