com.atlassian.jira.plugin.studio
Class RemoteProjectsStorage

java.lang.Object
  extended by com.atlassian.jira.plugin.studio.RemoteProjectsStorage

public class RemoteProjectsStorage
extends Object

Persist a remote project in the user's session.

Since:
5.2

Constructor Summary
RemoteProjectsStorage(javax.servlet.http.HttpSession session)
           
 
Method Summary
static RemoteProjectsStorage createFromHttpServletRequest(javax.servlet.http.HttpServletRequest request)
          Create a storage from the session attached to the servlet request.
 RemoteProjects pop()
          Return and remove the remote projects instance from the user's session.
 void push(RemoteProjects remoteProjects)
          Store the given remoteProjects in the user's session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteProjectsStorage

public RemoteProjectsStorage(@Nullable
                             javax.servlet.http.HttpSession session)
Method Detail

createFromHttpServletRequest

@Nullable
public static RemoteProjectsStorage createFromHttpServletRequest(@Nonnull
                                                                          javax.servlet.http.HttpServletRequest request)
Create a storage from the session attached to the servlet request.

Parameters:
request - the request from which the session should be used; not null
Returns:
a storage using the session from the request or null if there is no session existing

push

public void push(@Nonnull
                 RemoteProjects remoteProjects)
Store the given remoteProjects in the user's session. Any previously existing value is overwritten.

Parameters:
remoteProjects - the remote projects to be stored; not null

pop

@Nullable
public RemoteProjects pop()
Return and remove the remote projects instance from the user's session.

Returns:
a the remote projects; null if there is none


Copyright © 2002-2013 Atlassian. All Rights Reserved.