Skip to end of banner
Go to start of banner

Setup CRM.COM and plugin projects in your IDE

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Next »

Welcome to CRM.COM plugin development! The following guide provides instructions to setup your development environment and create the plugin projects using CRM.COM Plugin SDK.


What does this section cover?

Prerequisites

In order to start developing plugins from CRM.COM, you will need the following:

  • Oracle Java SE Development Kit 8 (JDK)
  • Eclipse IDE
  • Maven
  • Wildfly Application Server v10.1 or later
  • The CRM.COM Enterprise Archive (.ear file) - Provided by CRM.COM
  • The CRM.COM Plugin SDK - Provided by CRM.COM

Step-By-Step Guide

  • Open Eclipse IDE and import the .ear file into your workspace.





  • Extract CRM.COM Plugin SDK to a location in your filesystem where Wildfly Application Server has permission. 



  • Set the CRM_HOME system property in Wildfly's configuration file to the location the SDK was extracted.


Wildfly system properties

You can also set any Wildfly system properties through the Wildfl management console 

  • Create your plugin projects




  • Register your plugins by updating the plugins descriptor

The plugins.xml file is used to register your plugins. Using this file, you can define your plugins and the organisations that your plugins will be enabled for.

Note that the organisationid should be set to the same value as the MPID field of the MASTERPARTNERS table of the Ecenter database. 

For a full list of plugins file attributes, go to Plugins File Documentation.


plugins.xml
<pluginconfig>
	<plugins>
		<plugin>
			<name>switch</name>
			<description>Switch Provisioning Provider Plugin</description>
			<enabled>true</enabled>
			<vendor>CRM.COM</vendor>
			<version>1.0.0</version>
			<organisations>
				<organisationid>SUBSCRIPTIONS_DB</organisationid>
				<organisationid>ADMIN_DB</organisationid>
			</organisations>
		</plugin>
		<plugin>
			<name>kounta</name>
			<description>Kounta Point Of Sale System Plugin</description>
			<enabled>true</enabled>
			<vendor>CRM.COM</vendor>
			<version>1.0.0</version>
			<organisations>
				<organisationid>REWARDS_DB</organisationid>
				<organisationid>ADMIN_DB</organisationid>
			</organisations>
		</plugin>
	</plugins>
</pluginconfig>

Cache Properties File

From R13 onwards Hibernate second-level caching is used for the most of CRM.COM configuration entities. To enable this functionality you have to create cache.properties file and place it in the same directory as your custom project(s).


cache.properties
#enable/disable caching - true/false
enabled=true

#multicast address | multicast host name
multicastGroupAddress=224.0.0.251

#Multicast port
multicastGroupPort=4446
         
#0-255
#0 is restricted to the same host
#1 is restricted to the same subnet
#32 is restricted to the same site
#64 is restricted to the same region
#128 is restricted to the same continent
#255 is unrestricted
#The default value in Java is 1, which propagates to the same subnet. Change the timeToLive property to restrict or expand propagation.
timeToLive=1

#the hostname or IP of the interface to be used for sending and receiving multicast packets 
hostName=cyn1lnx007

#Mandatory - the port the listener listens on.
port=40001

#Optional - the number of seconds client sockets will wait when sending messages to this listener until they give up. By default this is 2000ms.
socketTimeoutMillis=2000

CRM.COM Java Projects

The CRM.COM .ear consists of 3 main Java projects, Crm.war, CrmAPI.war and CrmEJB.jar.

For each one of these projects, there is a corresponding custom Java project available in sample projects.

Depending on the custom to be implemented, the corresponding custom project should be modified.

Crm.war

This project includes all the files and code required to implement the View layer such as:

  • Pages
  • Reports ( WebContent/WEB-INF/reports )
  • Printouts ( WebContent/WEB-INF/printouts )
  • Dashboard components ( WebContent/WEB-INF/dashboards )

A detailed explanation of the view layer can be found at Developing the View layer

CrmAPI.war

This project includes all the code required to implement the CRM.COM Web API, that is, all the controller classes and Java classes required to parse the data in Web API requests and construct the data included in Web API response.

CrmEJB.jar

This project includes all files and code required to implement the Model and Controller layer. 

More specifically, this project includes the Data object classes, the Business object classes and Service (process) classes.

In addition, this project includes all the metadata required for the application to function correctly.

  • Application metadata
  • Module metadata
  • Menu options metadata
  • Entity metadata
  • Entity fields metadata
  • Variable metadata
  • Label translations to specific languages

A detailed explanation of the model layer can be found at Developing the Model layer, and a detailed explanation of the controller layer can be found at Developing the Controller layer











  • No labels