SCReadItemsRequest Class Reference
Inherits from | SCBaseItemRequest : NSObject |
Conforms to | NSCopying |
Declared in | SCReadItemsRequest.h |
Overview
The SCReadItemsRequest contains the set of params for the requested items from the backend.
It used for [SCApiSession readItemsOperationWithRequest:] method. All other loaders based on this method.
Tasks
-
scope
Specifies the set of the items which will be loaded.
property
Possible values are: SCReadItemSelfScope (self), SCReadItemParentScope (parent) and SCReadItemChildrenScope (children). By default, self is used.
The order of the result items will be: first is the parent item, then the self item and the children items at last.
This argument is ignored when [SCReadItemsRequest requestType] is SCReadItemRequestQuery -
request
Request string of the items.
property
Has a different meaning depends on [SCReadItemsRequest requestType] -
requestType
Specifies the type of [SCReadItemsRequest request] option, see [SCReadItemsRequest request] for details.
property
If [SCReadItemsRequest requestType] is a SCReadItemRequestQuery, it is a similar to [SCReadItemsRequest flags] is setted to SCReadItemRequestIngnoreCache. -
fieldNames
The set of the field’s names which will be read with each item. Each field’s name in the set should be a string.
property
For reading all fields - pass nil or pass empty set if you don’t need to read any field -
flags
Additional request flags:
property -
page
The number of paged, used only if [SCReadItemsRequest pageSize] is specified. Indexing starts from zero.
property -
pageSize
The page size of items, used for paged items loading. For example if you need to read only a second item for the given request, specify [SCReadItemsRequest pageSize] as 1 and [SCReadItemsRequest page] is 1.
property -
lifeTimeInCache
The life time in cache after which object in cache becames old
property -
+ requestWithItemId:
This method is usefull for loading one item by the item’s id.
Creates SCReadItemsRequest object with following fields: -
+ requestWithItemId:fieldsNames:
This method is usefull for loading one item by the item’s id.
Creates SCReadItemsRequest object with following fields: -
+ requestWithItemId:fieldsNames:scope:
This method is usefull for loading items with [SCReadItemsRequest scope] by the item’s id.
Creates SCReadItemsRequest object with following fields: -
+ requestWithItemPath:
This method is usefull for loading one item by the item’s id.
Creates SCReadItemsRequest object with following fields: -
+ requestWithItemPath:fieldsNames:
This method is usefull for loading one item by the item’s path.
Creates SCReadItemsRequest object with following fields: -
+ requestWithItemPath:fieldsNames:scope:
This method is usefull for loading items with [SCReadItemsRequest scope] by the item’s path.
Creates SCReadItemsRequest object with following fields:
Properties
fieldNames
The set of the field’s names which will be read with each item. Each field’s name in the set should be a string.
For reading all fields - pass nil or pass empty set if you don’t need to read any field
@property (nonatomic, strong) NSSet *fieldNames
Discussion
The set of the field’s names which will be read with each item. Each field’s name in the set should be a string.
For reading all fields - pass nil or pass empty set if you don’t need to read any field
Declared In
SCReadItemsRequest.h
flags
Additional request flags:
@property (nonatomic) SCReadItemRequestFlags flags
Discussion
Additional request flags:
SCReadItemRequestIngnoreCache - means that the request will ignore loaded items, and the request to backend will be performed.
SCReadItemRequestReadFieldsValues - for each field specified in fieldNames set - [SCField fieldValue] will be loaded before you’ve got a result with the items.
Declared In
SCReadItemsRequest.h
lifeTimeInCache
The life time in cache after which object in cache becames old
@property (nonatomic) NSTimeInterval lifeTimeInCache
Discussion
The life time in cache after which object in cache becames old
Declared In
SCReadItemsRequest.h
page
The number of paged, used only if [SCReadItemsRequest pageSize] is specified. Indexing starts from zero.
@property (nonatomic) NSUInteger page
Discussion
The number of paged, used only if [SCReadItemsRequest pageSize] is specified. Indexing starts from zero.
Declared In
SCReadItemsRequest.h
pageSize
The page size of items, used for paged items loading. For example if you need to read only a second item for the given request, specify [SCReadItemsRequest pageSize] as 1 and [SCReadItemsRequest page] is 1.
@property (nonatomic) NSUInteger pageSize
Discussion
The page size of items, used for paged items loading. For example if you need to read only a second item for the given request, specify [SCReadItemsRequest pageSize] as 1 and [SCReadItemsRequest page] is 1.
Declared In
SCReadItemsRequest.h
request
Request string of the items.
Has a different meaning depends on [SCReadItemsRequest requestType]
@property (nonatomic, strong) NSString *request
Discussion
Request string of the items.
Has a different meaning depends on [SCReadItemsRequest requestType]
If [SCReadItemsRequest requestType] is
SCReadItemRequestItemId - request is the item’s id, example: “{C3713481-AF86-4E33-9BE9-D53EFE03E518}”
SCReadItemRequestItemPath - request is the item’s path, example: “/sitecore/content”
SCReadItemRequestQuery - request is the Sitecore query, example: “/sitecore/content/nicam/child::*[@@templatename=‘Site Section’]”
Declared In
SCReadItemsRequest.h
requestType
Specifies the type of [SCReadItemsRequest request] option, see [SCReadItemsRequest request] for details.
If [SCReadItemsRequest requestType] is a SCReadItemRequestQuery, it is a similar to [SCReadItemsRequest flags] is setted to SCReadItemRequestIngnoreCache.
@property (nonatomic) SCReadItemRequestType requestType
Discussion
Specifies the type of [SCReadItemsRequest request] option, see [SCReadItemsRequest request] for details.
If [SCReadItemsRequest requestType] is a SCReadItemRequestQuery, it is a similar to [SCReadItemsRequest flags] is setted to SCReadItemRequestIngnoreCache.
Declared In
SCReadItemsRequest.h
scope
Specifies the set of the items which will be loaded.
Possible values are: SCReadItemSelfScope (self), SCReadItemParentScope (parent) and SCReadItemChildrenScope (children). By default, self is used.
The order of the result items will be: first is the parent item, then the self item and the children items at last.
This argument is ignored when [SCReadItemsRequest requestType] is SCReadItemRequestQuery
@property (nonatomic) SCReadItemScopeType scope
Discussion
Specifies the set of the items which will be loaded.
Possible values are: SCReadItemSelfScope (self), SCReadItemParentScope (parent) and SCReadItemChildrenScope (children). By default, self is used.
The order of the result items will be: first is the parent item, then the self item and the children items at last.
This argument is ignored when [SCReadItemsRequest requestType] is SCReadItemRequestQuery
Declared In
SCReadItemsRequest.h
Class Methods
requestWithItemId:
This method is usefull for loading one item by the item’s id.
Creates SCReadItemsRequest object with following fields:
+ (id)requestWithItemId:(NSString *)itemId
Parameters
- itemId
system item’s id, [SCItem itemId] can be used.
For reading all fields - pass nil or pass empty set if you don’t need to read any field
Return Value
SCReadItemsRequest object, used for [SCApiSession readItemsOperationWithRequest:] method.
Discussion
This method is usefull for loading one item by the item’s id.
Creates SCReadItemsRequest object with following fields:
[SCReadItemsRequest scope] is equal to SCReadItemSelfScope
[SCReadItemsRequest request] is equal to itemId argument
[SCReadItemsRequest requestType] is equal to SCReadItemRequestItemId
[SCReadItemsRequest fieldNames] is equal to empty set
[SCReadItemsRequest flags] is equal to zero
[SCReadItemsRequest page] is equal to zero
[SCReadItemsRequest pageSize] is equal to zero
Declared In
SCReadItemsRequest.h
requestWithItemId:fieldsNames:
This method is usefull for loading one item by the item’s id.
Creates SCReadItemsRequest object with following fields:
+ (id)requestWithItemId:(NSString *)itemId fieldsNames:(NSSet *)fieldNames
Parameters
- itemId
system item’s id, [SCItem itemId] can be used.
- fieldNames
The set of the field’s names which will be read with each item. Each field’s name in set should be a string.
For reading all fields - pass nil or pass empty set if you don’t need to read any field
Return Value
SCReadItemsRequest object, used for [SCApiSession readItemsOperationWithRequest:] method.
Discussion
This method is usefull for loading one item by the item’s id.
Creates SCReadItemsRequest object with following fields:
[SCReadItemsRequest scope] is equal to SCReadItemSelfScope
[SCReadItemsRequest request] is equal to itemId argument
[SCReadItemsRequest requestType] is equal to SCReadItemRequestItemId
[SCReadItemsRequest fieldNames] is equal to fieldNames argument
[SCReadItemsRequest flags] is equal to zero
[SCReadItemsRequest page] is equal to zero
[SCReadItemsRequest pageSize] is equal to zero
Declared In
SCReadItemsRequest.h
requestWithItemId:fieldsNames:scope:
This method is usefull for loading items with [SCReadItemsRequest scope] by the item’s id.
Creates SCReadItemsRequest object with following fields:
+ (id)requestWithItemId:(NSString *)itemId fieldsNames:(NSSet *)fieldNames scope:(SCReadItemScopeType)scope
Parameters
- itemId
system item’s id, [SCItem itemId] can be used.
- fieldNames
The set of the field’s names which will be read with each item. Each field’s name in set should be a string.
For reading all fields - pass nil or pass empty set if you don’t need to read any field
- scope
Specifies the set of the items which will be loaded. See [SCReadItemsRequest scope] for details
Return Value
SCReadItemsRequest object, used for [SCApiSession readItemsOperationWithRequest:] method.
Discussion
This method is usefull for loading items with [SCReadItemsRequest scope] by the item’s id.
Creates SCReadItemsRequest object with following fields:
[SCReadItemsRequest scope] is equal to scope argument
[SCReadItemsRequest request] is equal to itemId argument
[SCReadItemsRequest requestType] is equal to SCReadItemRequestItemId
[SCReadItemsRequest fieldNames] is equal to fieldNames argument
[SCReadItemsRequest flags] is equal to zero
[SCReadItemsRequest page] is equal to zero
[SCReadItemsRequest pageSize] is equal to zero
Declared In
SCReadItemsRequest.h
requestWithItemPath:
This method is usefull for loading one item by the item’s id.
Creates SCReadItemsRequest object with following fields:
+ (id)requestWithItemPath:(NSString *)itemPath
Parameters
- itemPath
system item’s path, [SCItem path] or string like “/sitecore/content” for example can be used.
For reading all fields - pass nil or pass empty set if you don’t need to read any field
Return Value
SCReadItemsRequest object, used for [SCApiSession readItemsOperationWithRequest:] method.
Discussion
This method is usefull for loading one item by the item’s id.
Creates SCReadItemsRequest object with following fields:
[SCReadItemsRequest scope] is equal to SCReadItemSelfScope
[SCReadItemsRequest request] is equal to itemPath argument
[SCReadItemsRequest requestType] is equal to SCReadItemRequestItemId
[SCReadItemsRequest fieldNames] is equal to empty set
[SCReadItemsRequest flags] is equal to zero
[SCReadItemsRequest page] is equal to zero
[SCReadItemsRequest pageSize] is equal to zero
Declared In
SCReadItemsRequest.h
requestWithItemPath:fieldsNames:
This method is usefull for loading one item by the item’s path.
Creates SCReadItemsRequest object with following fields:
+ (id)requestWithItemPath:(NSString *)itemPath fieldsNames:(NSSet *)fieldNames
Parameters
- itemPath
system item’s path, [SCItem path] or string like “/sitecore/content” for example can be used.
- fieldNames
The set of the field’s names which will be read with each item. Each field’s name in set should be a string.
For reading all fields - pass nil or pass empty set if you don’t need to read any field
Return Value
SCReadItemsRequest object, used for [SCApiSession readItemsOperationWithRequest:] method.
Discussion
This method is usefull for loading one item by the item’s path.
Creates SCReadItemsRequest object with following fields:
[SCReadItemsRequest scope] is equal to SCReadItemSelfScope
[SCReadItemsRequest request] is equal to itemPath argument
[SCReadItemsRequest requestType] is equal to SCReadItemRequestItemPath
[SCReadItemsRequest fieldNames] is equal to fieldNames argument
[SCReadItemsRequest flags] is equal to zero
[SCReadItemsRequest page] is equal to zero
[SCReadItemsRequest pageSize] is equal to zero
Declared In
SCReadItemsRequest.h
requestWithItemPath:fieldsNames:scope:
This method is usefull for loading items with [SCReadItemsRequest scope] by the item’s path.
Creates SCReadItemsRequest object with following fields:
+ (id)requestWithItemPath:(NSString *)itemPath fieldsNames:(NSSet *)fieldNames scope:(SCReadItemScopeType)scope
Parameters
- itemPath
system item’s path, [SCItem path] or string like “/sitecore/content” for example can be used.
- fieldNames
The set of the field’s names which will be read with each item. Each field’s name in set should be a string.
For reading all fields - pass nil or pass empty set if you don’t need to read any field
- scope
Specifies the set of the items which will be loaded. See [SCReadItemsRequest scope] for details
Return Value
SCReadItemsRequest object, used for [SCApiSession readItemsOperationWithRequest:] method.
Discussion
This method is usefull for loading items with [SCReadItemsRequest scope] by the item’s path.
Creates SCReadItemsRequest object with following fields:
[SCReadItemsRequest scope] is equal to scope argument
[SCReadItemsRequest request] is equal to itemPath argument
[SCReadItemsRequest requestType] is equal to SCReadItemRequestItemPath
[SCReadItemsRequest fieldNames] is equal to fieldNames argument
[SCReadItemsRequest flags] is equal to zero
[SCReadItemsRequest page] is equal to zero
[SCReadItemsRequest pageSize] is equal to zero
Declared In
SCReadItemsRequest.h