Skip to content

Instantly share code, notes, and snippets.

View rickx1's full-sized avatar

Ricardo Belfor rickx1

View GitHub Profile
@rickx1
rickx1 / Show principals display name.js
Last active April 26, 2020 15:57
This code will display the distinguished name of a group or user in the interface instead of the display name. Store these files as snippets in your browser developers tools and run them when needed.
// Restore the original function, showing the display name
if ( acceUtil ) {
if ( acceUtil.originalGetSecurityPrincipalDisplayName ) {
acceUtil.getSecurityPrincipalDisplayName = acceUtil.originalGetSecurityPrincipalDisplayName;
console.log("Showing the principals display name");
}
}
@rickx1
rickx1 / CEAPICollections.java
Last active May 19, 2020 18:11
Standard collection support for the FileNet Content Engine Java API. The GenerateCode.java file at the bottom of this gist is used to generate the most part of the CEAPICollections file. See http://ecmdeveloper.com/contentengine/collections-ceapi/ for more details.
package com.ecmdeveloper.jace.collections;
import java.util.Date;
import java.util.Iterator;
import com.filenet.api.admin.*;
import com.filenet.api.events.*;
import com.filenet.api.core.*;
import com.filenet.api.collection.*;
import com.filenet.api.collection.ChoiceList;
@rickx1
rickx1 / startBackgroundSearch.js
Created April 8, 2018 11:06
Starts a background search
importClass(Packages.com.filenet.api.constants.RefreshMode);
importClass(Packages.com.filenet.api.constants.SweepMode);
importClass(Packages.com.filenet.api.core.Factory);
importClass(Packages.java.text.SimpleDateFormat);
importClass(Packages.java.util.Calendar);
importClass(Packages.java.util.TimeZone);
function getRequiredProperties(){
}
@rickx1
rickx1 / CEAPIStreams.java
Last active May 30, 2020 13:11
Stream support for the FileNet Content Engine Java API. The GenerateCode.java file is used to generate the most part of the CEAPIStreams.java file. See http://ecmdeveloper.com/contentengine/java-8-ceapi/ for details.
package com.ecmdeveloper.jace.streams;
import java.util.Date;
import java.util.Iterator;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import com.filenet.api.admin.*;
import com.filenet.api.events.*;
import com.filenet.api.core.*;
@rickx1
rickx1 / UpdateSecurityProxy.java
Last active October 23, 2017 18:55
Code of a ChangePreprocessor implementing a security proxy based security scheme.
public class UpdateSecurityProxy implements ChangePreprocessor {
@Override
public boolean preprocessObjectChange(IndependentlyPersistableObject object)
throws EngineRuntimeException {
Property department = getDepartment(object);
if (department != null && department.isDirty()) {
updateSecurityProxy(object, department.getStringValue() );
return true;
@rickx1
rickx1 / ExternalDataRequest.java
Last active July 9, 2017 05:39
Documentation of the EDS api
/**
* The globally unique identifier (GUID) or persistent identifier (PID) that identifies the item that is being edited.
*/
public String getObjectId() // The ID of the object being edited
public Map<String, Property> getProperty() // A map of all the properties of the object
public RequestMode getRequestMode() // The reason why the EDS component is called
public String getRepositoryId() // The ID of the repository containing the properties
@rickx1
rickx1 / choicelist-example.js
Last active April 27, 2017 04:19
This is an example of an External Data Service Implementation for IBM Content Navigator using Node.js
var genders = choicelist.create("Genders");
choicelist.addChoice(genders, "Female");
choicelist.addChoice(genders, "Male");
var otherGenders = choicelist.addCategory(genders, "Other");
choicelist.addChoices(otherGenders, ["Polygender", "Cisgender", "Pangender", "Gender neutral"] ); // I know there are more...
property.choiceList = genders;
@rickx1
rickx1 / choicelist-data.js
Last active April 27, 2017 04:39
This is an example of an External Data Service Implementation for IBM Case Manager using Node.js
{
displayName: 'Genders',
choices:
[ { value: 'Female', displayName: 'Female' },
{ value: 'Male', displayName: 'Male' },
{ value: 'Other', displayName: 'Other' } ],
}
@rickx1
rickx1 / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../paper-toggle-button/paper-toggle-button.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../paper-slider/paper-slider.html">
@rickx1
rickx1 / response.json
Last active December 26, 2015 02:29
IBM Content Navigator External Data Services response.
{
"externalDataIdentifier": "opaque_identifier_meaningful_to_the_service",
"properties": [
{
"symbolicName": "symbolic_name",
"value": "potential_new_value",
"customValidationError": "Description of an invalid reason",
"customInvalidItems": [
0,
3,