Java Collections – HashMap and HashSet

HashMap and HashSet are collections in Java which are most commonly used. Here we summarise key features: HashMap   HashSet Duplicates Yes, Duplicate values but  no duplicate keys No Adding or Storing mechanism Hashing technique HashMap object Dummy values No Yes Implements Map Set Number Of Objects required during add operation 2 1 When to…

Alfresco Services Public Java APIs

Public Java API services The Public Java API provides access to Alfresco through a number of services that are exposed. These services are accessed via a single point of access – the Service Registry. This information provides an overview of the services exposed by the Public Java API. The following table summarizes the main services…

Java tips – Avoiding null checks in java

One of the worst nightmares for java developers ( from junior to experts ) is null object reference checking. I’m pretty sure you have seen several times code like this public void addAddressToCustomer(Customer customer, Address newAddress){ if ( cutomer == null || newAddress == null) return; if ( customer.getAddresses() == null ){ customer.setAddresses ( new…

AlfrescoSDK Creating a Repository extension project (AMP)

To get started we need developing a custom alfresco war we need to download the latest AlfrescoSDK from the community site: https://github.com/Alfresco/alfresco-sdk We require Alfresco Repository AMP for building our webscripts, workflow and custom UI. But before make sure you’ve met the pre-requisites as follows. You’ll need to download and install the following tools and libraries,…