Skip to content

Alfresco repository module with helpful javascript root object extensions which are helpful in much scenarios

License

Notifications You must be signed in to change notification settings

ecm4u/alfresco-jscript-extensions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alfresco-jscript-extensions

Alfresco (Master) Build Status Alfresco repository module with helpful javascript root object extensions which are helpful in much scenarios.

Important: Alfresco 4.2 - 5.0 is not supported anymore.

Usage since Alfresco 5.1.a

Add the dependencies to the Alfresco repository and share POM files of your WAR projects.

Alfresco SDK 2.x

<dependencies>
  ...
  <dependency>
    <groupId>de.jgoldhammer</groupId>
    <artifactId>alfresco-jscript-extension</artifactId>
    <version>1.7</version>
    <type>amp</type>
  </dependency>
  ...
</dependencies>

<overlays>
  ...
  <overlay>
    <groupId>de.jgoldhammer</groupId>
    <artifactId>alfresco-jscript-extension</artifactId>
    <version>1.7</version>
    <type>amp</type>
  </overlay>
  ...
</overlays>

Alfresco SDK 3.x

<platformModules>
	<moduleDependency>
		<groupId>de.jgoldhammer</groupId>
        	<artifactId>alfresco-jscript-extension</artifactId>
        	<version>1.7</version>
        	<type>amp</type>
    	</moduleDependency>
</platformModules>

Following root objects are provided:

  • attributes

    • get attributes by key
    • create attributes
    • remove attributes
    • example: tbd
  • auth

    • to change the authentication to another user during the javascript execution
    • to get the current executing authenticated user
    • example: tbd
  • batch

  • database

  • downloads

  • favorites

  • fileWriter

  • policies

    • to temporarly disable or enable policy behavours during javascript extecution
    • policy behaviours can be enabled or disabled on a specific node or a certain aspect/type
    • example: https://gist.github.com/jgoldhammer/6941414
  • jobs

  • permissions

  • repoAdmin

    • uses the repo admin interpreter from the repo admin console
    • write your commands and get back the result in the js-console
    • example 1: print(repoAdmin.exec('help')) - show the help
    • example 2: print(reopAdmin.exec('show models')); - show all additional datamodels
  • rules

  • tenantAdmin

    • uses the repo admin interpreter from the repo admin console
    • write your commands and get back the result in the js-console
    • example 1: print(tenantAdmin.exec('help')) - show the help
    • example 2: print(tenantAdmin.exec('show tenants')); - show all tenants (if you create one before!)
  • trans

    • create a new transaction
    • start, commit and rollback (database) transactions during the javascript execution
    • example: tbd
  • workflowAdmin

    • uses the workflowinterpreter from the workflow console
    • write your commands and get back the result in the js-console
    • example 1: print(workflowAdmin.exec('help')) - show the help
    • example 2: print(workflowAdmin.exec('show definitions')); - show all workflow definitions

Building

To build the module and its AMP / JAR files, run the following command from the base project directory:

mvn install

About

Alfresco repository module with helpful javascript root object extensions which are helpful in much scenarios

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 97.9%
  • FreeMarker 1.5%
  • Other 0.6%