5 Now, you can see the new attribute in the ADSI for each user object.

We can do that by the “Custom Oracle Webcenter Spaces Application – Profile Attributes Project”.

There are two java classes under this project:-

CustomProfileImpl.java: This class is used to override the value of an existing attribute or make it come from other data source: To override the existed attribute just add the code to this class as per the following

– We can use JSFUtils.java class to make personalized view for each user (each user can see his image from a specific data source).

The Second Class (ExtendedProfileAttributes.java): This class is used to add a new custom attribute to user profile

– First, We add a new attribute to the class and generate its assessors (getter and setter)

– Then Add your code in the getter Property to get the value of the attribute in the read-only mode (while you are viewing your profile as a spaces user) and add your code in the Setter Property to set the value the user enters in the edit mode of the task flow to a specific data source (Active Directory).

– Add JSFUtils.java to the ProfileAttributes project in the same package as ExtendProfileAttributes.java class (custom.webcenter.spaces) to be able to get or set values to expression language used by webcenter.

– Add . properties file to the ProfileAttributes project and add the values of the data source you are connecting to as per the following example:-

#This File contain the LDAP Configurations

INITIAL_CONTEXT_FACTORY = com.sun.jndi.ldap.LdapCtxFactory

SECURITY_AUTHENTICATION = simple

SECURITY_PRINCIPAL= cn=orcladmin

# SECURITY_PRINCIPAL= BPEL_TEST@sfdproject.com

SECURITY_CREDENTIALS = welcome1

PROVIDER_URL = ldap://myldap:port

TokenGroups = java.naming.ldap.attributes.binary

UserBase = dc=sfdproject, dc=com

username = sAMAccountName

testAttribute= testAttribute

– In the getter property (which will be called in the view mode) write the following code:-

Then, deploy WebcenterSpacesSharedLibExtension project using the Ant Apache after adding the jar of the ProfileAttributes Project to the War of the WebcenterSpacesSharedLibExtension project as per the next image

Then, Log in to the spaces with administrator user and navigate to the Resources of the group space you need to add the new attribute to, then choose the resource catalog you need and AddàNew Component and write this code down (in this example the added attribute called testAttribute).