lumis.portal.presentation.perspective.publisher
Class AutoAdministrationHelper

Package class diagram package AutoAdministrationHelper
java.lang.Object
  extended by lumis.portal.presentation.perspective.publisher.AutoAdministrationHelper

public abstract class AutoAdministrationHelper
extends Object

Class to help calculate information regarding auto-administration.

Since:
7.0.0

Constructor Summary
AutoAdministrationHelper()
           
 
Method Summary
static ServiceInstanceConfig findCurrentAutoAdministrationServiceInstance(SessionConfig sessionConfig, String channelId, Collection<String> serviceInstanceIds, ITransaction transaction)
          Discovers the current auto administration service instance.
static String findTargetChannelId(String startingChannelId)
          Retrieves the channelId of the closets auto-administration service instance for the startingChannelId.
static boolean isAutoAdministrationPage(HttpServletRequest request, String currentPageId, ITransaction transaction)
          Decides if the user came from or is in an auto administration page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoAdministrationHelper

public AutoAdministrationHelper()
Method Detail

findTargetChannelId

public static String findTargetChannelId(String startingChannelId)
                                  throws PortalException
Retrieves the channelId of the closets auto-administration service instance for the startingChannelId.

Parameters:
startingChannelId - current channel id.
Returns:
the the channelId of the closets auto-administration service instance for the startingChannelId, returns null if it doesn't find one.
Throws:
PortalException
Since:
7.0.0

findCurrentAutoAdministrationServiceInstance

public static ServiceInstanceConfig findCurrentAutoAdministrationServiceInstance(SessionConfig sessionConfig,
                                                                                 String channelId,
                                                                                 Collection<String> serviceInstanceIds,
                                                                                 ITransaction transaction)
                                                                          throws PortalException
Discovers the current auto administration service instance.

Parameters:
sessionConfig - session for the current user.
channelId - channel id of the channel in which you want to discover the nearest service instance of the auto administration service.
serviceInstanceIds - list of auto administration services available.
transaction - in which the method should be part of.
Returns:
auto administration service instance config 'nearest' to the given channel.
Throws:
PortalException
Since:
7.0.0

isAutoAdministrationPage

public static boolean isAutoAdministrationPage(HttpServletRequest request,
                                               String currentPageId,
                                               ITransaction transaction)
                                        throws PortalException
Decides if the user came from or is in an auto administration page. It first verifies if the lumAAPreviousPage cookie is available. If the cookie is not available, will ask if the current page is an auto-administrative page.

Parameters:
request - to retrieve the cookie from.
currentPageId - page the user is currently in.
transaction - in which the method should be part of.
Returns:
true when the lumAAPreviousPage is present and is an auto-administration page or when the current page is the default auto-administration page or, if the cookie is not present, if the current page is an auto-administrative page; while return false otherwise.
Throws:
PortalException
Since:
7.0.0


Lumisportal  7.0.0.121130 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.