Home > Contents > Index >
AssetLoadAll
Loads all assets specified in the input list and creates objects with names made up of the prefix name plus a counter.
Syntax
assetLoadAll(java.lang.String authusername, java.lang.String authpassword, java.lang.String TYPE, java.lang.String SUBTYPE, java.lang.String IDS, com.FatWire.IList LIST, java.lang.String IDFIELD, java.lang.String EXCLUDE, java.lang.String FIELDLIST, java.lang.String SITEID, java.lang.String DEPTYPE, java.lang.String GETCHILDREN, java.lang.String CODE, java.lang.String CHILDTYPE, java.lang.String CHILDID, java.lang.String ORDER)Parameters
authusername (required)
- (String) Name of the user to log in, as registered in Sites .
authpassword(required)
- (String) Password for the associated user name.
TYPE (required)
- (String) The asset type of the asset that you want to retrieve from the database.
SUBTYPE (optional)
- (String) Asset subtype.
IDS (optional)
- (String) You must use either the LIST or IDS parameter. A variable containing a comma or semicolon separated list of asset IDs to load.
LIST (optional)
- (IList object) You must use either the LIST or IDS parameter. Contain the IDs of assets to load. This object can not contain any null/empty values.
IDFIELD (optional)
- (String) Name of the field in the list object which specifies the object ID of the asset. The default value is
ID
.
FIELDLIST (optional)
- (String) Comma-seperated list of fields that you want to include or exclude from the request for asset fields. The
EXCLUDE
parameter, which operates on the field list, determines whter the fields in the list are returned or whether all fields other than those in the list are returned.
EXCLUDE (optional)
- (String) Depending on whether the value of
EXCLUDE
isTrue
orFalse
, this operation either returns the fields specified in theFIELDLIST
parameter or returns the fields not contained in the list.True
indicates that all fields except the fields in theFIELDLIST
are to be returned.False
indicates that only fields inFIELDLIST
are to be returned. That is, it returns fields specified with theFIELDLIST
parameter. The default value isFalse
.
SITEID (optional)
- (String) ID of the site (formerly publication).
DEPTYPE (optional)
exact
(default) -- Exact
specifies a version dependency. The version of the dependent asset must be equal to the version of the asset when it was approved.exists
-- Exists
specifies that any version of the asset satisfies the dependency condition.none
-- None
specifies no approval dependency on the asset.
GETCHILDREN (optional)
- (String) Legal values are
True
orFalse
. SpecifyingTrue
will also load the asset's children.
CODE (optional)
- (String). Restricts the list to include only the child assets that have the relationship (association) specified by this parameter. You can restrict the list by named associations or by unnamed relationships. This value comes from the
ncode
field of the AssetRelationTree.
- For example, if you include
OBJECTTYPE="Image"
andCODE="MainImage"
for an article asset, Sites lists only the image asset that is related to that article asset by the Main Image named association. Without theCODE
entry, Sites lists all the images associated with the article.
- To list only the child assets that are associated with the parent asset by unnamed relationships, use a hyphen (-). For example:
CODE= "-"
- If you do not specify
OBJECTTYPE
orCODE
, the list includes all children with named associations or unnamed relationships to the parent asset.
- Valid values are either
Placed
orUnplaced
.
CHILDTYPE (optional)
- (String) The asset type of child that you want to retrieve. The child asset type, which can be the same as the
TYPE
parameter, depends on the asset that you are passing. For example, common asset types includearticle
,image
,page
,collection
, andquery
. Other asset types include those flex assets for Sites and Sites-Engage assets. If noChildTYPE
parameter is passed, theGetChildren
operation returns all children for the asset by default.
CHILDID (optional)
- (String) The object ID of the specific child node to return. If you supply a child ID, you must also supply a child type. If no child ID is specified, the
GetChildren
operation returns all children for the asset.
ORDER (optional)
- (String) The fields to sort the list by, and whether the sort result on those fields is
ascending
ordescending
. For example, you can specifyID
,name
,date
,created by user
, and so on. By default, the sort isascending
. If you specify more than one field, separate the field names with a comma.
- For example, if you specify
ORDER="nrank"
, the list is sorted by rank starting at number 1. If you want the list sorted by descending rank, useORDER="nrank desc"
.
Description
Loads into memory all assets specified, assigning the object a name, composed of the prefix plus a counter.
If a list is passed as input and the asset type is a basic asset type and the list contains at least as many columns as the primary storage table for the asset type, the asset is loaded from the list without further querying of the database. If the asset type is not a basic asset or the list passed has fewer columns than the number of columns in the asset type's primary storage table, then the id is extracted and used to load the asset data into memory.
If a string is passed with a list of ids, those are used to load the asset data. Note that the order of ids in the list is not retained - the loaded asset objects may be in any order.
A variable, with a name consisting of the
[prefix]
Total indicates how many assets were loaded.Returns
Array of objects that contains loaded assets and children if specified
Error Numbers
The possible values of
errno
include:
Value Description -1000 Revision tracking error. -10001 The implementing class is invalid. -10002 There is a missing method for the implementing class. -10003 The method could not be invoked successfully. -10004 A required parameter is missing.
Example
The following example code loads with IDS field:
AssetService service = new AssetServiceLocator(); AssetPortType port = service.getassetPort(); ArrayOfAssetsWithChildren loadedassets = port.assetLoadAll("user_author", "demo", "Content_C", null, "1125274447575,1202138292252,1114083739926", null, null, null, null, null, null, null, null, null, null, null);The following example code first retrieves a list of Content_C with the LIST field:
AssetService service = new AssetServiceLocator(); AssetPortType port = service.getassetPort(); IList myList = new IList(); String colName[] = {"assetid", "assettype"}; myList.setColName(colName); String item1[] = {"1114083739951", "Content_C"}; String item2[] = {"1114083740036", "Content_C"}; StringRowsType items[] = new StringRowsType[2]; items[0] = new StringRowsType(); items[1] = new StringRowsType(); items[0].setItem(item1); items[1].setItem(item2); myList.setStringRow(items); ArrayOfAssetsWithChildren loadedassets = port.assetLoadAll("user_author", "demo", "Content_C", null, null, myList, "id", null, null, null, null, null, null, null, null, null);See Also
Home > Contents > Index > ![]()
Oracle Web Services Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.