(self, ticket, search_key, context="publish", version=-1, file_type='main', level_key=None, single=False, versionless=False, process=None, path_types=[])
return paths
method to get paths from an sobject

        @params
        ticket - authentication ticket
        search_key - a unique identifier key representing an sobject
        @keyparams:
        context - context of the snapshot
        version - version of the snapshot
        level_key - the unique identifier of the level that this
            was checked into
        single - returns a single path for each category instead of a list
            this is useful if it is know that there is only one file in the
            snapshot
        versionless - boolean to return the versionless snapshot, which takes a version of -1 (latest)  or 0 (current)
        path_types - on of web, client, sandbox, relative

        @return
        A dictionary of lists representing various paths.  The paths returned
        are as follows:
        - client_lib_paths: all the paths to the repository relative to the client
        - lib_paths: all the paths to the repository relative to the server
        - sandbox_paths: all of the paths mapped to the sandbox
        - web: all of the paths relative to the http server
method to get paths from an sobject
method to get paths from an sobject
def get_paths(self, ticket, search_key, context="publish", version=-1, file_type='main', level_key=None, single=False, versionless=False, process=None, path_types=[]):
        '''method to get paths from an sobject

        @params
        ticket - authentication ticket
        search_key - a unique identifier key representing an sobject
        @keyparams:
        context - context of the snapshot
        version - version of the snapshot
        level_key - the unique identifier of the level that this
            was checked into
        single - returns a single path for each category instead of a list
            this is useful if it is know that there is only one file in the
            snapshot
        versionless - boolean to return the versionless snapshot, which takes a version of -1 (latest)  or 0 (current)
        path_types - on of web, client, sandbox, relative

        @return
        A dictionary of lists representing various paths.  The paths returned
        are as follows:
        - client_lib_paths: all the paths to the repository relative to the client
        - lib_paths: all the paths to the repository relative to the server
        - sandbox_paths: all of the paths mapped to the sandbox
        - web: all of the paths relative to the http server

        '''

        sobjects = self._get_sobjects(search_key)
        sobject = sobjects[0]

        search_type = sobject.get_search_type()
        search_id = sobject.get_code()
        search_key = SearchKey.get_by_sobject(sobject)

        if process:
            context = None

        # get the level object
        if level_key:
            level = SearchKey.get_by_search_key(level_key)
            if not level:
                raise ApiException("Level SObject with key [%s] does not exist" % level_key)
            level_type = level.get_search_type()
            level_id = level.get_id()
        else:
            level_type = None
            level_id = None

        if not versionless:
            snapshot = Snapshot.get_snapshot(search_type, search_id, context, version, level_type=level_type, level_id=level_id, process=process)
        else:
            if version in [-1, 'latest']:
                versionless_mode = 'latest'
            else:
                versionless_mode = 'current'
            snapshot = Snapshot.get_versionless(search_type, search_id, context , mode=versionless_mode, create=False, process=process)
        if not snapshot:
            # This is probaby too strict
            #raise ApiException("Snapshot for [%s] with context [%s], version [%s] does not exist" % (search_key, context, version))
            paths = {}
            return paths


        paths = {}
        if file_type == "*":
            client_lib_paths = snapshot.get_all_client_lib_paths()
            sandbox_paths = snapshot.get_all_sandbox_paths()
            web_paths = snapshot.get_all_remote_web_paths()
            lib_paths = snapshot.get_all_lib_paths()

            if single:
                paths['client_lib_path'] = client_lib_paths[0]
                paths['sandbox_path'] = sandbox_paths[0]
                paths['web_path'] = web_paths[0]
                paths['lib_path'] = lib_paths[0]
            else:
                paths['client_lib_paths'] = client_lib_paths
                paths['sandbox_paths'] = sandbox_paths
                paths['web_paths'] = web_paths
                paths['lib_paths'] = lib_paths


        else:
            if "client" in path_types or not path_types:
                client_lib_path = snapshot.get_client_lib_path_by_type(file_type)
                if not client_lib_path:
                    raise ApiException("File of type [%s] does not exist in snapshot [%s]" % (file_type, snapshot.get_code()) )
                if single:
                    paths['client_lib_path'] = client_lib_path
                else:
                    paths['client_lib_paths'] = [client_lib_path]

            if "sandbox" in path_types or not path_types:
                sandbox_path = snapshot.get_sandbox_path_by_type(file_type)
                if single:
                    paths['sandbox_path'] = sandbox_path
                else:
                    paths['sandbox_paths'] = [sandbox_path]


            if "web" in path_types or not path_types:
                web_path = snapshot.get_remote_web_path_by_type(file_type)
                if single:
                    paths['web_path'] = web_path
                else:
                    paths['web_paths'] = [web_path]


            if "lib" in path_types or not path_types:
                lib_path = snapshot.get_lib_path_by_type(file_type)
                if single:
                    paths['lib_path'] = lib_path
                else:
                    paths['lib_paths'] = [lib_path]

            if "relative" in path_types or not path_types:
                relative_path = snapshot.get_web_path_by_type(file_type)
                if single:
                    paths['relative_path'] = relative_path
                else:
                    paths['relative_path'] = [relative_path]


        return paths
def get_paths ( self , ticket , search_key , context = "publish" , version = - 1 , file_type = 'main' , level_key = None , single = False , versionless = False , process = None , path_types = [ ] ) : sobjects = self . _get_sobjects ( search_key ) sobject = sobjects [ 0 ] search_type = sobject . get_search_type ( ) search_id = sobject . get_code ( ) search_key = SearchKey . get_by_sobject ( sobject ) if process : context = None # get the level object if level_key : level = SearchKey . get_by_search_key ( level_key ) if not level : raise ApiException ( "Level SObject with key [%s] does not exist" % level_key ) level_type = level . get_search_type ( ) level_id = level . get_id ( ) else : level_type = None level_id = None if not versionless : snapshot = Snapshot . get_snapshot ( search_type , search_id , context , version , level_type = level_type , level_id = level_id , process = process ) else : if version in [ - 1 , 'latest' ] : versionless_mode = 'latest' else : versionless_mode = 'current' snapshot = Snapshot . get_versionless ( search_type , search_id , context , mode = versionless_mode , create = False , process = process ) if not snapshot : # This is probaby too strict #raise ApiException("Snapshot for [%s] with context [%s], version [%s] does not exist" % (search_key, context, version)) paths = { } return paths paths = { } if file_type == "*" : client_lib_paths = snapshot . get_all_client_lib_paths ( ) sandbox_paths = snapshot . get_all_sandbox_paths ( ) web_paths = snapshot . get_all_remote_web_paths ( ) lib_paths = snapshot . get_all_lib_paths ( ) if single : paths [ 'client_lib_path' ] = client_lib_paths [ 0 ] paths [ 'sandbox_path' ] = sandbox_paths [ 0 ] paths [ 'web_path' ] = web_paths [ 0 ] paths [ 'lib_path' ] = lib_paths [ 0 ] else : paths [ 'client_lib_paths' ] = client_lib_paths paths [ 'sandbox_paths' ] = sandbox_paths paths [ 'web_paths' ] = web_paths paths [ 'lib_paths' ] = lib_paths else : if "client" in path_types or not path_types : client_lib_path = snapshot . get_client_lib_path_by_type ( file_type ) if not client_lib_path : raise ApiException ( "File of type [%s] does not exist in snapshot [%s]" % ( file_type , snapshot . get_code ( ) ) ) if single : paths [ 'client_lib_path' ] = client_lib_path else : paths [ 'client_lib_paths' ] = [ client_lib_path ] if "sandbox" in path_types or not path_types : sandbox_path = snapshot . get_sandbox_path_by_type ( file_type ) if single : paths [ 'sandbox_path' ] = sandbox_path else : paths [ 'sandbox_paths' ] = [ sandbox_path ] if "web" in path_types or not path_types : web_path = snapshot . get_remote_web_path_by_type ( file_type ) if single : paths [ 'web_path' ] = web_path else : paths [ 'web_paths' ] = [ web_path ] if "lib" in path_types or not path_types : lib_path = snapshot . get_lib_path_by_type ( file_type ) if single : paths [ 'lib_path' ] = lib_path else : paths [ 'lib_paths' ] = [ lib_path ] if "relative" in path_types or not path_types : relative_path = snapshot . get_web_path_by_type ( file_type ) if single : paths [ 'relative_path' ] = relative_path else : paths [ 'relative_path' ] = [ relative_path ] return paths