Tabnine Logo
PortletMessaging
Code IndexAdd Tabnine to your IDE (free)

How to use
PortletMessaging
in
org.apache.portals.messaging

Best Java code snippets using org.apache.portals.messaging.PortletMessaging (Showing top 20 results out of 315)

origin: org.apache.portals.bridges/portals-bridges-velocity

protected void publishRenderMessage(PortletRequest request, String message, Object value)
{
  try
  {
    if (topic == null)
      PortletMessaging.publish(request, message, value);
    else
      PortletMessaging.publish(request, topic, message, value);
  }
  catch (Exception e)
  {}
}
origin: org.apache.portals.bridges/portals-bridges-velocity

protected Object consumeRenderMessage(PortletRequest request, String message)
{
  try
  {
    if (topic == null)
      return PortletMessaging.consume(request, message);            
    else
      return PortletMessaging.consume(request, topic, message);            
  }
  catch (Exception e)
  {}        
  return null;
}

origin: org.apache.portals.bridges/portals-bridges-velocity

protected Object receiveRenderMessage(PortletRequest request, String message)
{
  try
  {
    if (topic == null)
      return PortletMessaging.receive(request, message);
    else
      return PortletMessaging.receive(request, topic, message);
  }
  catch (Exception e)
  {}
  return null;
}

origin: org.apache.portals.applications/apa-webcontent-jar

  WebContentHistoryList history = (WebContentHistoryList)PortletMessaging.receive(actionRequest, HISTORY);
WebContentHistoryList history = (WebContentHistoryList)PortletMessaging.receive(actionRequest, HISTORY);
if (history == null)
  history = new WebContentHistoryList();
history.visitPage(new WebContentHistoryPage(webContentURL,webContentParams,webContentMethod));
PortletMessaging.publish(actionRequest, HISTORY, history);
origin: org.apache.portals.bridges/portals-bridges-velocity

protected void cancelRenderMessage(PortletRequest request, String message)
{
  try
  {
    if (topic == null)
      PortletMessaging.cancel(request, message);
    else
      PortletMessaging.cancel(request, topic, message);
  }
  catch (Exception e)
  {}
}

origin: org.apache.portals.applications/apa-webcontent2-portlets

  WebContentPageHistory history = (WebContentPageHistory)PortletMessaging.receive(actionRequest, HISTORY);
WebContentPageHistory history = (WebContentPageHistory)PortletMessaging.receive(actionRequest, HISTORY);
PortletMessaging.publish(actionRequest, HISTORY, history);
origin: org.apache.portals.jetspeed-2/portals-gems

public void publishStatusMessage(PortletRequest request, String portlet, String topic, Throwable e, String message)
{
  String msg = message + ": " + e.toString();
  Throwable cause = e.getCause();
  if (cause != null)
  {
    msg = msg + ", " + cause.getMessage();
  }
  StatusMessage sm = new StatusMessage(msg, StatusMessage.ERROR);
  try
  {
    // TODO: fixme, bug in Pluto on portlet session
    PortletMessaging.publish(request, portlet, topic, sm);
  }
  catch (Exception ee)
  {
    System.err.println("Failed to publish message: " + e);
  }        
}
origin: org.apache.portals.applications/apa-webcontent2-portlets

WebContentPageHistory history = (WebContentPageHistory)PortletMessaging.receive(request, HISTORY);
PortletMessaging.publish(request, HISTORY, history);
origin: org.apache.portals.jetspeed-2/portals-gems

public void doEdit(RenderRequest request, RenderResponse response)
throws PortletException, IOException
{
  response.setContentType("text/html");
  StatusMessage msg = (StatusMessage)PortletMessaging.consume(request, "DatabaseBrowserPortlet", "dbConnectTest");
  if (msg != null)
  {
    this.getContext(request).put("statusMsg", msg);            
  }
  super.doEdit(request, response);
}

origin: org.apache.portals.applications/apa-webcontent2-portlets

public String getURLSource(RenderRequest request, RenderResponse response, PortletPreferences prefs)
{
  String [] srcReplaceValues = { request.getServerName(), Integer.toString(request.getServerPort()), request.getContextPath() };
  
  String source = (String) PortletMessaging.receive(request, IFRAME_SRC_URL);
  
  if (source == null)
  {
    source = StringUtils.replaceEach(getAttributePreference(prefs, "SRC"), SRC_REPLACE_KEYS, srcReplaceValues);
  }
  
  // Sometimes, iframe's SRC attribute can be set to a local url to allow cross-domain scripting.
  // If proxy remote URL and its corresponding local path are set, then the proxy remote URL prefix
  // should be replaced by the local path.
  
  String proxyRemoteURL = StringUtils.replaceEach(getAttributePreference(prefs, "PROXYREMOTEURL"), SRC_REPLACE_KEYS, srcReplaceValues);
  String proxyLocalPath = StringUtils.replaceEach(getAttributePreference(prefs, "PROXYLOCALPATH"), SRC_REPLACE_KEYS, srcReplaceValues);
  
  if (StringUtils.isNotEmpty(proxyRemoteURL) && StringUtils.isNotEmpty(proxyLocalPath) && StringUtils.startsWith(source, proxyRemoteURL))
  {
    source = proxyLocalPath + source.substring(proxyRemoteURL.length());
  }
  
  return source;
}
origin: org.apache.portals.applications/apa-gems

public void publishStatusMessage(PortletRequest request, String portlet, String topic, Throwable e, String message)
{
  String msg = message + ": " + e.toString();
  Throwable cause = e.getCause();
  if (cause != null)
  {
    msg = msg + ", " + cause.getMessage();
  }
  StatusMessage sm = new StatusMessage(msg, StatusMessage.ERROR);
  try
  {
    // TODO: fixme, bug in Pluto on portlet session
    PortletMessaging.publish(request, portlet, topic, sm);
  }
  catch (Exception ee)
  {
    System.err.println("Failed to publish message: " + e);
  }
}
origin: org.apache.portals.applications/apa-webcontent-jar

WebContentHistoryList history = (WebContentHistoryList)PortletMessaging.receive(request, HISTORY);
if (history == null)
  history = new WebContentHistoryList();
PortletMessaging.publish(request, HISTORY, history);
origin: org.apache.portals.applications/apa-gems

PortletPreferences prefs = request.getPreferences();
windowSize = Integer.parseInt(prefs.getValue(WINDOW_SIZE, "10"));
StatusMessage message = (StatusMessage) PortletMessaging.consume(request, "DatabaseBrowserPortlet", "action");
if (sortorder==null)
origin: org.apache.portals.applications/apa-webcontent-jar

public String getURLSource(RenderRequest request, RenderResponse response, PortletPreferences prefs)
{
  String [] srcReplaceValues = { request.getServerName(), Integer.toString(request.getServerPort()), request.getContextPath() };
  
  String source = (String) PortletMessaging.receive(request, IFRAME_SRC_URL);
  
  if (source == null)
  {
    source = StringUtils.replaceEach(getAttributePreference(prefs, "SRC"), SRC_REPLACE_KEYS, srcReplaceValues);
  }
  
  // Sometimes, iframe's SRC attribute can be set to a local url to allow cross-domain scripting.
  // If proxy remote URL and its corresponding local path are set, then the proxy remote URL prefix
  // should be replaced by the local path.
  
  String proxyRemoteURL = StringUtils.replaceEach(getAttributePreference(prefs, "PROXYREMOTEURL"), SRC_REPLACE_KEYS, srcReplaceValues);
  String proxyLocalPath = StringUtils.replaceEach(getAttributePreference(prefs, "PROXYLOCALPATH"), SRC_REPLACE_KEYS, srcReplaceValues);
  
  if (StringUtils.isNotEmpty(proxyRemoteURL) && StringUtils.isNotEmpty(proxyLocalPath) && StringUtils.startsWith(source, proxyRemoteURL))
  {
    source = proxyLocalPath + source.substring(proxyRemoteURL.length());
  }
  
  return source;
}
origin: org.apache.portals.applications/apa-dbbrowser-jar

public void publishStatusMessage(PortletRequest request, String portlet, String topic, Throwable e, String message)
{
  String msg = message + ": " + e.toString();
  Throwable cause = e.getCause();
  if (cause != null)
  {
    msg = msg + ", " + cause.getMessage();
  }
  StatusMessage sm = new StatusMessage(msg, StatusMessage.ERROR);
  try
  {
    // TODO: fixme, bug in Pluto on portlet session
    PortletMessaging.publish(request, portlet, topic, sm);
  }
  catch (Exception ee)
  {
    System.err.println("Failed to publish message: " + e);
  }
}
origin: org.apache.portals.applications/portals-gems

PortletPreferences prefs = request.getPreferences();
windowSize = Integer.parseInt(prefs.getValue(WINDOW_SIZE, "10"));
StatusMessage message = (StatusMessage) PortletMessaging.consume(request, "DatabaseBrowserPortlet", "action");
if (message != null)
origin: org.apache.portals.applications/apa-webcontent-jar

Cookie[] cookies = (Cookie[])PortletMessaging.receive(request, HTTP_STATE);
if (cookies != null)
origin: org.apache.portals.applications/portals-gems

public void publishStatusMessage(PortletRequest request, String portlet, String topic, Throwable e, String message)
{
  String msg = message + ": " + e.toString();
  Throwable cause = e.getCause();
  if (cause != null)
  {
    msg = msg + ", " + cause.getMessage();
  }
  StatusMessage sm = new StatusMessage(msg, StatusMessage.ERROR);
  try
  {
    // TODO: fixme, bug in Pluto on portlet session
    PortletMessaging.publish(request, portlet, topic, sm);
  }
  catch (Exception ee)
  {
    System.err.println("Failed to publish message: " + e);
  }
}
origin: org.apache.portals.jetspeed-2/portals-gems

StatusMessage message = (StatusMessage)PortletMessaging.consume(request, "DatabaseBrowserPortlet", "action");
if (message != null)
origin: org.apache.portals.applications/apa-webcontent2-portlets

List<Cookie> cookies = (List<Cookie>) PortletMessaging.receive(request, HTTP_STATE);
org.apache.portals.messagingPortletMessaging

Javadoc

PortletMessageComponent Throwaway Naive implementation of Porlet Messages as an abstraction and a place holder for when the next spec covers inter-portlet communication

Most used methods

  • publish
  • consume
  • receive
  • cancel

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JFileChooser (javax.swing)
  • JList (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now