Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

ApplyResourcePackage
ChangeResourceOwner
CopyResource
DeleteResource
DeleteResourceData
EnumerateReferences
EnumerateResourceData
EnumerateResources
EnumerateResources
EnumerateUnmanagedData
GetRepositoryContent
GetRepositoryHeader
GetResourceContent
GetResourceData
GetResourceHeader
InheritPermissionsFrom
MoveResource
RenameResourceData
ResourceExists
SetResource
SetResourceData
UpdateRepository
virtual void MgResourceService::ApplyResourcePackage | ( | MgByteReader * | resourcePackage | ) | `[pure virtual]`
Applies a package of resource changes to the repository. Remarks: This method only works on "Library" repository. Cross repository (Library:// and Session:a2c8e5ba//) changes in a single package are not supported. .NET Syntax
`virtual void ApplyResourcePackage(MgByteReader resourcePackage);`
Java Syntax
`virtual void ApplyResourcePackage(MgByteReader resourcePackage);`
PHP Syntax
`virtual void ApplyResourcePackage(MgByteReader resourcePackage);`
  Parameters:
  | resourcePackage | (MgByteReader) The package containing resources to update.
Returns: Returns nothing. Example (PHP)
     // Assuming $resourceService is already initialized.
     $filepath = 'C:\Data\Packages\package.mgp';
     $byteSource = new MgByteSource($filepath);
     $byteReader = $byteSource->GetReader();
     $resourceService->ApplyResourcePackage($byteReader);
  Exceptions:
  | MgNullArgumentException |
  | MgInvalidRepositoryTypeException |
  | MgInvalidRepositoryNameException |
  | MgInvalidResourcePathException |
  | MgInvalidResourceNameException |
  | MgInvalidResourceTypeException |
  | MgOutOfMemoryException |
Note: ApplyResourcePackage is atomic. If a resource operation in the package fails to execute, then all operations up to that point are rolled back. This method only affects the library repository.

Comments or suggestions? Send us feedback.