You
can retrieve resources from a given location in the repository in
order to read their content and metadata. The workflow is front-ended
by an initialization form. The process has all the permissions it
needs to read the form. The system retrieves the data form and reads
the content from the repository. The repository grants access to
the content and the metadata (the ability to even know the resource
exists).
The repository has the following four permission types:
traverse: allows you to list resources; that is,
to read resource metadata, but not resource content
read: allows you to read resource content
write: allows you to write resource content
managing access control lists (ACLs): allows you to
manipulate ACLs on resources
Users can only run processes when they have permission to run
the process. IDE users need traverse and read permissions to synchronize
with the repository. ACLs apply only at design time because runtime
occurs within the system context.
You can programmatically read resources by using the Repository
service Java API or web service API.
Summary of stepsTo read a resource, follow these steps:
Include project files.
Create a Repository service client.
Specify the URI of the resource to be read.
Read the resource.
Include project filesInclude the necessary files in your development
project. If you are creating a client application using Java, include
the necessary JAR files. If you are using web services, include
the proxy files.
Create the service clientBefore you can programmatically read
a resource, you must establish a connection and provide credentials.
This is accomplished by creating a service client.
Specify the URI of the resource to be readCreate a string containing
the URI of the resource to be read. The syntax includes forward
slashes, as in this example: "/path/resource".
Read the resourceInvoke the Repository service method to read
the resource, specifying the URI.
Read resources using the Java APIRead a resource by using the Repository service API (Java):
Include project files
Include client JAR files
in your Java project’s class path.
Create the service client
Create a ResourceRepositoryClient object
by using its constructor and passing a ServiceClientFactory object
that contains connection properties.
Specify the URI of the resource to be read
Specify
a string value that represents the URI of the resource to retrieve.
For example, assuming the resource is named testResource which
is located in a folder named testFolder, specify /testFolder/testResource.
Read the resource
Invoke the ResourceRepositoryClient object’s readResource method
and pass the URI of the resource as a parameter. This method returns a Resource instance
that represents the resource.
Reading resources using the web service APIRead a resource by using the Repository service API (web
service):
Include project files
Create the service client
Using the Microsoft .NET
client assembly, create a RepositoryServiceService object
by invoking its default constructor. Set its Credentials property
using a System.Net.NetworkCredential object containing
the user name and password.
Specify the URI of the resource to be read
Specify
a string containing the URI of the resource to be retrieved. In
this case, because the resource named testResource is
in the folder named testFolder, its URI is "/testFolder/testResource".
When using a language compliant with the Microsoft .NET Framework
(for example, C#), store the URI in a System.String object.
Read the resource
Invoke the RepositoryServiceService object’s readResource method
and pass the URI of the resource as the first parameter. Pass null for the
other two parameters.
|
|
|