AlfrescoSiteService Class Reference
Inherits from | NSObject |
Declared in | AlfrescoSiteService.h |
Overview
The AlfrescoSiteService provides various ways to retrieve sites from an Alfresco repository.
Author: Gavin Cornwell (Alfresco), Tijs Rademakers (Alfresco), Peter Schmidt (Alfresco)
Tasks
Initialisation methods
-
– initWithSession:
Initialises with a standard Cloud or OnPremise session
Retrieval methods for the Alfresco Site Service
-
– retrieveAllSitesWithCompletionBlock:
Retrieves all the sites in the repository.
-
– retrieveAllSitesWithListingContext:completionBlock:
Retrieves sites in the repository with listing context.
-
– retrieveSitesWithCompletionBlock:
Retrieves all the sites for the current user of the session.
-
– retrieveSitesWithListingContext:completionBlock:
Retrieves the sites for the current session user with listing context.
-
– retrieveFavoriteSitesWithCompletionBlock:
Retrieves all the favorite sites for the current session user.
-
– retrieveFavoriteSitesWithListingContext:completionBlock:
Retrieves the favorite sites for the current session user with listing context.
-
– retrieveSiteWithShortName:completionBlock:
Retrieves a site with the given short name, if the site doesn’t exist nil is returned.
-
– retrieveDocumentLibraryFolderForSite:completionBlock:
Retrieves the folder that represents the root of the Document Library for the site with the given short name.
-
– addFavoriteSite:completionBlock:
Marks a site as favorite and adds it to the favorite list
-
– removeFavoriteSite:completionBlock:
Unmarks a site as favorite and removes it from the favorite list
-
– joinSite:completionBlock:
Creates a request to join a site. Please, note, this method works for both joining public and joining moderated sites. For public sites, the same AlfrescoSite object will be returned in the completion block. For moderated sites, an updated AlfrescoSite object will be returned - with pending flag set to YES.
-
– retrievePendingSitesWithCompletionBlock:
Retrieves a list of sites for which a join request is pending
-
– retrievePendingSitesWithListingContext:completionblock:
Retrieves a list of pending join request sites with a specified listing context
-
– cancelPendingJoinRequestForSite:completionBlock:
Cancels a join request for a specified site
-
– leaveSite:completionBlock:
Leave a site
-
– retrieveAllMembersOfSite:completionBlock:
Returns a list of all members for a site.
-
– retrieveAllMembersOfSite:listingContext:completionBlock:
Returns a paged list of all members for a site.
-
– searchMembersOfSite:keywords:listingContext:completionBlock:
Returns a paged list of site members that respect the keyword.
-
– isPerson:memberOfSite:completionBlock:
Returns true if the person is member of the site, returns false otherwise
-
– clear
Clears the sites cache
Instance Methods
addFavoriteSite:completionBlock:
Marks a site as favorite and adds it to the favorite list
- (AlfrescoRequest *)addFavoriteSite:(AlfrescoSite *)site completionBlock:(AlfrescoSiteCompletionBlock)completionBlock
Parameters
- site
the site to be added to favorites
- completionBlock
- returns the updated AlfrescoSite object (isFavorite set to YES) or nil if unsuccessful
Discussion
Marks a site as favorite and adds it to the favorite list
Declared In
AlfrescoSiteService.h
cancelPendingJoinRequestForSite:completionBlock:
Cancels a join request for a specified site
- (AlfrescoRequest *)cancelPendingJoinRequestForSite:(AlfrescoSite *)site completionBlock:(AlfrescoSiteCompletionBlock)completionBlock
Parameters
- site
- the pending site for which the join request is to be cancelled
- completionBlock
- returns the updated AlfrescoSite object or nil if unsuccessful
Discussion
Cancels a join request for a specified site
Declared In
AlfrescoSiteService.h
clear
Clears the sites cache
- (void)clear
Discussion
Clears the sites cache
Declared In
AlfrescoSiteService.h
initWithSession:
Initialises with a standard Cloud or OnPremise session
- (id)initWithSession:(id<AlfrescoSession>)session
Parameters
- session
the AlfrescoSession to initialise the site service with.
Discussion
Initialises with a standard Cloud or OnPremise session
Declared In
AlfrescoSiteService.h
isPerson:memberOfSite:completionBlock:
Returns true if the person is member of the site, returns false otherwise
- (AlfrescoRequest *)isPerson:(AlfrescoPerson *)person memberOfSite:(AlfrescoSite *)site completionBlock:(AlfrescoMemberCompletionBlock)completionBlock
Parameters
- person
- person for whom membership status is retrieved
- site
- site from which membership status for the person is retrieved
- completionBlock
- returns yes or no depending of person membership status in the site
Discussion
Returns true if the person is member of the site, returns false otherwise
Declared In
AlfrescoSiteService.h
joinSite:completionBlock:
Creates a request to join a site. Please, note, this method works for both joining public and joining moderated sites. For public sites, the same AlfrescoSite object will be returned in the completion block. For moderated sites, an updated AlfrescoSite object will be returned - with pending flag set to YES.
- (AlfrescoRequest *)joinSite:(AlfrescoSite *)site completionBlock:(AlfrescoSiteCompletionBlock)completionBlock
Parameters
- site
- the site to join
- completionBlock
- returns the updated AlfrescoSite object or nil if unsuccessful
Discussion
Creates a request to join a site. Please, note, this method works for both joining public and joining moderated sites. For public sites, the same AlfrescoSite object will be returned in the completion block. For moderated sites, an updated AlfrescoSite object will be returned - with pending flag set to YES.
Declared In
AlfrescoSiteService.h
leaveSite:completionBlock:
Leave a site
- (AlfrescoRequest *)leaveSite:(AlfrescoSite *)site completionBlock:(AlfrescoSiteCompletionBlock)completionBlock
Parameters
- site
- site to leave
- completionBlock
- returns the updated AlfrescoSite object or nil if unsuccessful
Discussion
Leave a site
Declared In
AlfrescoSiteService.h
removeFavoriteSite:completionBlock:
Unmarks a site as favorite and removes it from the favorite list
- (AlfrescoRequest *)removeFavoriteSite:(AlfrescoSite *)site completionBlock:(AlfrescoSiteCompletionBlock)completionBlock
Parameters
- site
the site to be added to favorites
- completionBlock
- returns the updated AlfrescoSite object (isFavorite set to NO) or nil if unsuccessful
Discussion
Unmarks a site as favorite and removes it from the favorite list
Declared In
AlfrescoSiteService.h
retrieveAllMembersOfSite:completionBlock:
Returns a list of all members for a site.
- (AlfrescoRequest *)retrieveAllMembersOfSite:(AlfrescoSite *)site completionBlock:(AlfrescoArrayCompletionBlock)completionBlock
Parameters
- site
- site from which members are retrieved
- completionBlock
- contains Array of person objects who are member of site if successful, or nil if not.
Discussion
Returns a list of all members for a site.
Declared In
AlfrescoSiteService.h
retrieveAllMembersOfSite:listingContext:completionBlock:
Returns a paged list of all members for a site.
- (AlfrescoRequest *)retrieveAllMembersOfSite:(AlfrescoSite *)site listingContext:(AlfrescoListingContext *)listingContext completionBlock:(AlfrescoPagingResultCompletionBlock)completionBlock
Parameters
- site
- site from which members are retrieved
- listingContext
- The listing context with a paging definition that’s used to retrieve members.
- completionBlock
- contains Array of person objects that are members of the site if successful, or nil if not.
Discussion
Returns a paged list of all members for a site.
Declared In
AlfrescoSiteService.h
retrieveAllSitesWithCompletionBlock:
Retrieves all the sites in the repository.
- (AlfrescoRequest *)retrieveAllSitesWithCompletionBlock:(AlfrescoArrayCompletionBlock)completionBlock
Parameters
- completionBlock
The block that’s called with the retrieved sites in case the operation succeeds.
Discussion
Retrieves all the sites in the repository.
Declared In
AlfrescoSiteService.h
retrieveAllSitesWithListingContext:completionBlock:
Retrieves sites in the repository with listing context.
- (AlfrescoRequest *)retrieveAllSitesWithListingContext:(AlfrescoListingContext *)listingContext completionBlock:(AlfrescoPagingResultCompletionBlock)completionBlock
Parameters
- listingContext
The listing context with a paging definition that’s used to retrieve the sites.
- completionBlock
The block that’s called with the retrieved sites in case the operation succeeds.
Discussion
Retrieves sites in the repository with listing context.
Declared In
AlfrescoSiteService.h
retrieveDocumentLibraryFolderForSite:completionBlock:
Retrieves the folder that represents the root of the Document Library for the site with the given short name.
- (AlfrescoRequest *)retrieveDocumentLibraryFolderForSite:(NSString *)siteShortName completionBlock:(AlfrescoFolderCompletionBlock)completionBlock
Parameters
- siteShortName
The short name of the site for which the document library needs to be retrieved.
- completionBlock
The block that’s called with the retrieved document library folder in case the operation succeeds.
Discussion
Retrieves the folder that represents the root of the Document Library for the site with the given short name.
Declared In
AlfrescoSiteService.h
retrieveFavoriteSitesWithCompletionBlock:
Retrieves all the favorite sites for the current session user.
- (AlfrescoRequest *)retrieveFavoriteSitesWithCompletionBlock:(AlfrescoArrayCompletionBlock)completionBlock
Parameters
- completionBlock
The block that’s called with the retrieved sites in case the operation succeeds.
Discussion
Retrieves all the favorite sites for the current session user.
Declared In
AlfrescoSiteService.h
retrieveFavoriteSitesWithListingContext:completionBlock:
Retrieves the favorite sites for the current session user with listing context.
- (AlfrescoRequest *)retrieveFavoriteSitesWithListingContext:(AlfrescoListingContext *)listingContext completionBlock:(AlfrescoPagingResultCompletionBlock)completionBlock
Parameters
- listingContext
The listing context with a paging definition that’s used to retrieve the sites.
- completionBlock
The block that’s called with the retrieved sites in case the operation succeeds.
Discussion
Retrieves the favorite sites for the current session user with listing context.
Declared In
AlfrescoSiteService.h
retrievePendingSitesWithCompletionBlock:
Retrieves a list of sites for which a join request is pending
- (AlfrescoRequest *)retrievePendingSitesWithCompletionBlock:(AlfrescoArrayCompletionBlock)completionBlock
Parameters
- completionBlock
- returns an array of AlfrescoSite objects or nil if unsuccessful
Discussion
Retrieves a list of sites for which a join request is pending
Declared In
AlfrescoSiteService.h
retrievePendingSitesWithListingContext:completionblock:
Retrieves a list of pending join request sites with a specified listing context
- (AlfrescoRequest *)retrievePendingSitesWithListingContext:(AlfrescoListingContext *)listingContext completionblock:(AlfrescoPagingResultCompletionBlock)completionBlock
Parameters
- listingContext
The listing context with a paging definition that’s used to retrieve the sites.
- completionBlock
The block that’s called with the retrieved sites in case the operation succeeds.
Discussion
Retrieves a list of pending join request sites with a specified listing context
Declared In
AlfrescoSiteService.h
retrieveSiteWithShortName:completionBlock:
Retrieves a site with the given short name, if the site doesn’t exist nil is returned.
- (AlfrescoRequest *)retrieveSiteWithShortName:(NSString *)siteShortName completionBlock:(AlfrescoSiteCompletionBlock)completionBlock
Parameters
- siteShortName
The short name of the site that needs to be retrieved.
- completionBlock
The block that’s called with the retrieved site in case the operation succeeds.
Discussion
Retrieves a site with the given short name, if the site doesn’t exist nil is returned.
Warning: the method can return both a nil error object and a nil site object. This is the case when a valid request has been made to the server to retrieve the site, but the site has not been found.
Declared In
AlfrescoSiteService.h
retrieveSitesWithCompletionBlock:
Retrieves all the sites for the current user of the session.
- (AlfrescoRequest *)retrieveSitesWithCompletionBlock:(AlfrescoArrayCompletionBlock)completionBlock
Parameters
- completionBlock
The block that’s called with the retrieved sites in case the operation succeeds.
Discussion
Retrieves all the sites for the current user of the session.
Declared In
AlfrescoSiteService.h
retrieveSitesWithListingContext:completionBlock:
Retrieves the sites for the current session user with listing context.
- (AlfrescoRequest *)retrieveSitesWithListingContext:(AlfrescoListingContext *)listingContext completionBlock:(AlfrescoPagingResultCompletionBlock)completionBlock
Parameters
- listingContext
The listing context with a paging definition that’s used to retrieve the sites.
- completionBlock
The block that’s called with the retrieved sites in case the operation succeeds.
Discussion
Retrieves the sites for the current session user with listing context.
Declared In
AlfrescoSiteService.h
searchMembersOfSite:keywords:listingContext:completionBlock:
Returns a paged list of site members that respect the keyword.
- (AlfrescoRequest *)searchMembersOfSite:(AlfrescoSite *)site keywords:(NSString *)keywords listingContext:(AlfrescoListingContext *)listingContext completionBlock:(AlfrescoPagingResultCompletionBlock)completionBlock
Parameters
- site
- site from which members are retrieved
- keywords
- space delimited keywords that needs to be applied to search query.
- listingContext
- The listing context with a paging definition that’s used to retrieve members.
- completionBlock
- contains Array of person objects that are members of the site if successful, or nil if not.
Discussion
Returns a paged list of site members that respect the keyword.
Declared In
AlfrescoSiteService.h