MapGuide API Reference
|
virtual void MgResourceService::ChangeResourceOwner | ( | MgResourceIdentifier * | resource, |
CREFSTRING | owner, | ||
bool | includeDescendants | ||
) | [pure virtual] |
Changes the owner of a resource.
virtual void ChangeResourceOwner(MgResourceIdentifier resource, string owner, bool includeDescendants); |
virtual void ChangeResourceOwner(MgResourceIdentifier resource, String owner, boolean includeDescendants); |
virtual void ChangeResourceOwner(MgResourceIdentifier resource, string owner, bool includeDescendants); |
resource | (MgResourceIdentifier) Resource whose owner is to be changed. This resource can be a document or folder. If it is a folder, you must include the trailing slash in the identifier. |
owner | (String/string) The User ID of the new owner. (The User ID must already exist. You can create User IDs through the Site Administrator tool.) |
includeDescendants | (boolean/bool) Flag to determine whether or not the owners of descendant resources should be also be changed. This flag is applicable only if the resource is a folder. |
// Assuming $resourceService is already initialized. $resourceID= new MgResourceIdentifier("Library://Geography/World.MapDefinition"); $resourceService->ChangeResourceOwner($resourceID, "John Smith", false);