Package pl.net.bluesoft.rnd.processtool.plugins

Examples of pl.net.bluesoft.rnd.processtool.plugins.ProcessToolRegistry$ThreadUtil


  private SchedulersActivator schedulerActivator;
 
  @Override
  public void start(BundleContext context) throws Exception
  {
    ProcessToolRegistry registry = getRegistry(context);
   
   
    schedulerActivator = new SchedulersActivator(registry);
   
    /* Init the bpm notification engine */
    engine = new BpmNotificationEngine(registry);
   
        registry.registerService(BpmNotificationService.class, engine, new Properties());
    registry.getEventBusManager().subscribe(BpmEvent.class, this);
   
    mailEventListener = new MailEventListener(engine);
    registry.getEventBusManager().subscribe(MailEvent.class, mailEventListener);
   
    /* Register scheduler for notifications sending */
    schedulerActivator.scheduleNotificationsSend(engine);
 
    getViewRegistry(registry).registerGenericPortletViewRenderer("admin", BpmAdminPortletRender.INSTANCE);
View Full Code Here


 
 

  @Override
  public void stop(BundleContext context) throws Exception {
    ProcessToolRegistry registry = getRegistry(context);
        registry.removeRegisteredService(BpmNotificationService.class);
    registry.getEventBusManager().unsubscribe(BpmEvent.class, this);
    registry.getEventBusManager().unsubscribe(MailEvent.class, mailEventListener);
    mailEventListener = null;

    getViewRegistry(registry).unregisterGenericPortletViewRenderer("admin", BpmAdminPortletRender.INSTANCE);
    getViewRegistry(registry).unregisterGenericPortletViewRenderer("user", BpmAdminPortletRender.INSTANCE);
  }
View Full Code Here

    public static DateFormat fullDateFormat() {
        return new SimpleDateFormat(FULL_DATE_FORMAT_STRING);
    }

    public static ProcessToolContextFactory getProcessToolContext(ApplicationContext applicationContext) {
        ProcessToolRegistry factory = null;
        if (applicationContext instanceof PortletApplicationContext2) {
            PortletApplicationContext2 portletCtx = (PortletApplicationContext2) applicationContext;
            factory = (ProcessToolRegistry) portletCtx.getPortletConfig()
                    .getPortletContext()
                    .getAttribute(ProcessToolRegistry.class.getName());
        }
        return factory != null ? factory.getProcessToolContextFactory() : null;
    }
View Full Code Here

    protected void handleRequest(final PortletRequest request, final PortletResponse response) throws PortletException, IOException {
        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
        CURRENT_REQUEST.set(request);
        try {
            ProcessToolRegistry registry = (ProcessToolRegistry) getPortletConfig().getPortletContext()
                    .getAttribute(ProcessToolRegistry.class.getName());
            if (registry == null) {
        if (getApplication() != null) {
          getApplication().getMainWindow().addComponent(new Label(
              "Aperte Workflow is being installed. Please refresh your page."
          ));
        }
        Logger.getLogger(ProcessToolVaadinApplicationPortlet2.class.getSimpleName()).severe(ProcessToolRegistry.class.getName() + " not found in servlet context");
        //throw new ProcessToolException(ProcessToolRegistry.class.getName() + " not found in servlet context");
        return;
            }
            registry.withProcessToolContext(new ProcessToolContextCallback() {
                @Override
                public void withContext(ProcessToolContext ctx) {
                    ProcessToolContext.Util.setThreadProcessToolContext(ctx);
                    try {
                        try {
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.plugins.ProcessToolRegistry$ThreadUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.