Versions Compared


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

Extends directory persistance unit

First you need to define your JPA entities and the persistence.xml file in your bundle classpath.

Then you can extends the directory persistence unit with your JPA entities by consuming the directory JPA service and then calling the addSubPersistenceBundle method.

An example  example :

Code Block
@Provides(properties= {@StaticServiceProperty(name="targetArianeComponent", type="java.lang.String", value="Portal")})
public class RabbitmqDirectoryBootstrap implements FaceletsResourceResolverService {
    private static final Logger log = LoggerFactory.getLogger(RabbitmqDirectoryBootstrap.class);
    private static final String RBMQ_DIRECTORY_PLUGIN = "Ariane RabbitMQ Plugin Directory";
    private static final String basePath = "/META-INF";
    private static final String FACES_CONFIG_FILE_PATH= basePath + "/faces-config.xml";
    private static final String REST_EP_FILE_PATH = basePath + "/rest.endpoints";
    private static String MAIN_MENU_DIRECTORY_CONTEXT;

    private DirectoryJPAProvider directoryJpaProvider = null;
    private static DirectoryJPAProvider directoryJPAProviderSgt = null;

    public void bindJPAProvider(DirectoryJPAProvider r) {
        log.debug("Bound to directory JPA provider...");
        directoryJpaProvider = r;
        directoryJPAProviderSgt = r;

    public void unbindJPAProvider() {
        log.debug("Unbound from directory JPA provider...");
        directoryJpaProvider = null;
        directoryJPAProviderSgt = null;
    public void validate() throws Exception {
        plugRESTEndpoints();"{} is started", new Object[]{RBMQ_DIRECTORY_PLUGIN});
    private void plugDirectoryJPAProvider() {
        Company pivotal = null;
        Application rabbitmq = null;


Extends directory tree menu

You can extends the directory tree menu by consuming the directory tree menu roots registry and adding your own tree menu entities.

Keep in mind you need to define the of the service you're consuming : 

Code Block
private TreeMenuRootsRegistry rootDirectoryRegistry;

TreeMenuRootsRegistry is a tool defined on portal (and implemented by directory), check (again) the portal doc to know more on how to use it.