com.day.crx.packaging
Interface PackageShareSession


public interface PackageShareSession

PackageShareSession...


Method Summary
 Proxy createProxy(boolean suppressId)
          Returns a proxy to the package share server
 Set<PackageInfo> getAvailablePackages()
          Returns the packages the user of this session can access.
 long getCreationTime()
          Returns the time in milliseconds when this session was aquired.
 String getId()
          Returns the id of this session
 PackageShare getService()
          Returns the package share service
 JSONObject getSessionInfo()
          Returns the JSON object of the session info provided by the server.
 Set<String> getSharedGroups()
          Returns a list of groups this use is allowed to write
 String getUserId()
          Returns the id of the user that own this session
 String getUserName()
          Returns the name of the user
 boolean isAnonymous()
          Checks if this session is the anonymous session.
 boolean isNew()
          Checks if the session is new and never connected to the packageshare.
 void logout()
          Logs this session out and discards it from the session pool
 JSONResponse uploadPackage(File file, String name, ProxyTracker tracker, String group)
          Uploads a package to the package share
 JSONResponse uploadPackage(Node file, ProxyTracker tracker, String group)
          Uploads a package to the package share
 

Method Detail

isAnonymous

boolean isAnonymous()
Checks if this session is the anonymous session.

Returns:
true if this session is the anonymous session

getService

PackageShare getService()
Returns the package share service

Returns:
the service

getId

String getId()
Returns the id of this session

Returns:
the id.

getCreationTime

long getCreationTime()
Returns the time in milliseconds when this session was aquired.

Returns:
the creation time

isNew

boolean isNew()
Checks if the session is new and never connected to the packageshare.

Returns:
true if new.

getUserId

String getUserId()
Returns the id of the user that own this session

Returns:
the user id

getUserName

String getUserName()
Returns the name of the user

Returns:
the name

getSharedGroups

Set<String> getSharedGroups()
Returns a list of groups this use is allowed to write

Returns:
list of groups

getAvailablePackages

Set<PackageInfo> getAvailablePackages()
Returns the packages the user of this session can access.

Returns:
the packages available.

getSessionInfo

JSONObject getSessionInfo()
Returns the JSON object of the session info provided by the server.

Returns:
the json object or null

logout

void logout()
Logs this session out and discards it from the session pool


createProxy

Proxy createProxy(boolean suppressId)
Returns a proxy to the package share server

Parameters:
suppressId - true to suppress automatic addition of the daypsid
Returns:
the proxy

uploadPackage

JSONResponse uploadPackage(Node file,
                           ProxyTracker tracker,
                           String group)
                           throws IOException,
                                  RepositoryException
Uploads a package to the package share

Parameters:
file - the file node
tracker - the tracker
group - desired package group
Returns:
the status response form the server
Throws:
IOException - if an error occurs
RepositoryException - if a repository error occurs

uploadPackage

JSONResponse uploadPackage(File file,
                           String name,
                           ProxyTracker tracker,
                           String group)
                           throws IOException,
                                  RepositoryException
Uploads a package to the package share

Parameters:
file - the file
name - the name
tracker - the tracker
group - desired package group
Returns:
the status response form the server
Throws:
IOException - if an error occurs
RepositoryException - if a repository error occurs


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.