Home >
Purpose TOC | Annotated TOC |
AssetGetSiteParent
Loads the parent page of the specified page asset into memory as the
Assetobject.Syntax
assetGetSiteParent(java.lang.String authusername, java.lang.String authpassword, java.lang.String TYPE, java.lang.String OBJECTID, java.lang.String FIELD, java.lang.String VALUE, java.lang.String EXCLUDE, java.lang.String FIELDLIST, java.lang.String GETCHILDREN, java.lang.String CODE, java.lang.String CHILDTYPE, java.lang.String CHILDID, java.lang.String ORDER, com.FatWire.LoadedAssetHolder assetLoad, com.FatWire.IListHolder listOUT)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. For a web service, the value must be
page.
- Typically, you provide
TYPEandOBJECTID. When you know that a specific field/value pair can uniquely identify the asset, you can provideTYPEand the field/value pair instead. Either theOBJECTIDor theFIELDandVALUEcombination, but not both, are required to load an asset.
OBJECTID (optional)- (String) The unique identifying number that references the
Assetobject. Not required if you useTYPEwith theFIELDandVALUEpaired parameters (defined below).
FIELD (optional)- (String) A field is any one of the column names for the asset. For example, standard fields for Sites assets include name, template, status, description,
subtype,category,modified,headline,byline, andbody. Use the field name in conjunction with theVALUEparameter as the name portion of a name/value pair. The field name and its corresponding value uniquely identifies the asset to be loaded. Note that if the field/value pair that you supply identifies more than one asset, theAssetLoadoperation uses the first one that it finds.
- Not required if you use
TYPEwith theOBJECTIDparameter.
VALUE (optional)- (String) Value that corresponds to the field specified by the
FIELDparameter. Paired with the field name, uniquely identifies an asset by supplying its associated value.
- Not required if you use
TYPEwith theOBJECTIDparameter.
EXCLUDE (optional)- (Boolean) Depending on whether the value of
EXCLUDEisTrueorFalse, this operation either returns the fields specified in theFIELDLISTparameter or returns the fields not contained in the list.
Trueindicates that all fields except the fields in theFIELDLISTare to be returned.
Falseindicates that only fields inFIELDLISTare to be returned. That is, it returns fields specified with theFIELDLISTparameter. The default value isFalse.
FIELDLIST (optional)- (String) Comma-separated list of fields that you want to include or exclude from the request for asset fields. The
EXCLUDEparameter, which operates on the field list, determines whether the fields in the list are returned or whether all fields other than those in the list are returned.
GETCHILDREN (optional)- (String) Legal values are
TrueorFalse. SpecifyingTruewill 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
ncodefield 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 theCODEentry, 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
OBJECTTYPEorCODE, the list includes all children with named associations or unnamed relationships to the parent asset.
- Valid values are either
PlacedorUnplaced.
CHILDTYPE (optional)- (String) The asset type of child that you want to retrieve. The child asset type, which can be the same as the
TYPEparameter, 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 noChildTYPEparameter is passed, theGetChildrenoperation 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
GetChildrenoperation 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
ascendingordescending. 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.
assetLoad (required)- (LoadedAssetHolder) Output parameter for holding the returned loaded asset.
listOUT (required)- (IListHolder) Output parameter for holding the returned IList if any.
Description
This operation queries the SitePlanTree table and then loads, as an object, the parent page of the specified page asset. It functions like AssetLoad.
You typically use this operation to display information about the hierarchical position of the current page, for example, to create a link to the current page's parent page. This operation determines the parent page and then loads the parent page.
Returns
Assetobject that represents the site parent.Error Numbers
The possible values of
errnoinclude:
Value Description -112 No parent exists. -10001 The implementing class is invalid. -10002 There is a missing operation for the implementing class. -10003 The operation could not be invoked successfully. -10004 A required parameter is missing. -10005 The requested object is not in the object pool (is not loaded into memory). -10006 The object ID is not valid. -10007 The version of the object is not valid. -10008 The node ID of the object is not valid. -10009 More than one object met the specified criteria. -12007 The specified value is not valid.
Example
This code loads a page asset, loads its parent page, extracts the name of the parent page asset, and then displays the name:
AssetService service = new AssetServiceLocator(); AssetPortType port = service.getAssetPort(); LoadedAssetHolder holder = new LoadedAssetHolder(); port.assetGetSiteParent("user_author", "demo", "Page", "990743462410", null, null, null, null, null, null, null, null, null, holder, new IListHolder()); LoadedAsset asset = holder.value;
Home > Contents > Index > ![]()
Oracle Web Services Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.