Core concept of Atmoic type in Hybris. How to create Your own Atomic type in Hybris ?

Hello Friends 

If you are entry level in hybris, then you must have knowledge of some very basic of hybris type i.e. Atomic Type 

Some time interviewer ask question related atmic type in hybris like

what is atomic type in hybris?

How you can create your own atomic type in hybris ? if possible to create.


So Atomic type is most basic type in hybris which representation of java.lang.Number and java.lang.Object  like below

 <atomictype class="java.lang.Number" extends="java.lang.Object" autocreate="true" generate="false"/> 
 <atomictype class="java.lang.String" extends="java.lang.Object" autocreate="true" generate="false"/>

 Above already define atomic type in hybris

 If you want to create your own Atomic type in hybris then you have follow below steps like EveryReplyAtomicType then



 1. Create class EveryReplyAtomicType.java

 2. Then your class must have to implements Serializable interface

 Now define it define in your *.items.xml file as below

 <atomictype class="src.every.EveryReplyAtomicType.java" extends="java.lang.Object" autocreate="true" generate="false"/> 

 You can see in above declaration there in no code attribute to set the unique identifier. Instead, the AtomicType's class attribute is used as its reference.

 Your class

 EveryReplyAtomicType implements Serializable {

 }

How to customize access rights for hmc user's login in hybris | step by step to create type access rights to hmc logged user

There was requirement related hmc login where for some user only can do limited work means only see user’s related work  like create employee , company etc

Means it related to accrees rights of hmc logged in user

You allready know that when you are logging through admin means admin and password nimda you can see all hmc rights as below screen shot



Because admin user is part of admin group so admin is able to see all hmc rights

If you create any user and will part of admin group that can see all.

But in my requirement where user can see some user’s related work  like create employee , company etc

So below step you can do

1.       Create user group everyreply_usergroup







2.       After create user group - everyreply_usergroup go to Access Rights tab



Now add object




Search customer identifier – basically every thing is item type so you can search on which type you want give rights to this group




After add you can see below access rights where you can see read, change, create, delete so what rights you want to for this type , can give to this group so you need to just checked as below



Then finally save it
3.       Now create employee like as below



With password




Now assign it to user group that you have created - everyreply_usergroup as below




4.       Now you can login with these employee userid and password then you can your hmc only given type access rights can see in your hmc as below
               





Note- you can do everything above by using impEx