Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Check Installation and Licensing (v 2.34) for further information.

...

Check Installation and Licensing (v 2.34) for further information.

...

The UPJ Java API consists out of two basic elements: the profile element and the profile element data. Profile elements can be added and removed in the UPJ administration (check Create and Edit User Profile Elements (v 2.34) for further information). Values may afterwards be added for every user via an LDAP sync or by manually editing user profiles (in the administration or the user does it on his own) or even by using our new Java API.

...

You have to use matching profile element and data types to be able to interact with the API. Furthermore the specialized data objects make an interaction with a specific data type more easy.

...

Event publication

ProfileElementDataChangedEvent

The User Profiles for Jira App publish every minute an event for all changes that are taken since the last publishingpublication. The event contains the changes as a collection of change setsupdates. Each change set update contains a key of an user, a profile element , the old and new data. The following table shows the models of the change sets:

Profile Element Change Set Models

Profile Element Models

Data Models

AutocompleteProfileElementDataChangeSetAutocompleteProfileElementDataUpdate

AutocompleteProfileElement

Set<String>

MultiSelectProfileElementDataMultiSelectProfileElementDataUpdate

MultiSelectProfileElement

Set<OptionedProfileElement.Option>

SingleSelectProfileElementDataSingleSelectProfileElementDataUpdate

SingleSelectProfileElement

OptionedProfileElement.Option

TextBasedProfileElementDataTextBasedProfileElementDataUpdate

TextBasedProfileElement

String

UserProfileElementDataUserProfileElementDataUpdate

UserProfileElement

UserKey

ProfileElementNameChangedEvent

This event will publish if an default name of a profile element was changed. It contains the updated profile element.

ProfileElementRemovedEvent

This event will publish if a profile element was removed. It contains the removed profile element.

ProfileElementOptionNameChangedEvent

This event will publish if the default name of an option of a profile element was changed. It contains the updated profile element and the updated option.

ProfileElementOptionRemovedEvent

This event will publish if an option of a profile element was removed. It contains the updated profile element and the removed option.

Examples

To kickstart you a little bit more, we want to provide you with a few examples on what you can currently do with our Java API:

...

To be able to store data, the type of the profile Element must match the type of the data.

ProfileElementDataChangedEvent

Event Listener example

Code Block
languagexml
<!-- add the listener as component to atlassian-plugin.xml -->
<component key="unique-key-for-your-event-listener" class="path.to.your.event.listener.class.in.this.example.ProfileElementDataChangeEventListener"/>
<!-- or use @Component at your listener class if you use the annotation notation in your app --> 

...