Web Service Example 1
This example assumes that the back-end API can take the IDs for several entity instances and return the rights the user has on all of those instances. Notice that a System.Int64[] array of values is returned, which the Business Data Catalog will return to the calling Entity.CheckAccess method.
Following is how the back-end public method might look for this example:
public System.Int64 CheckUserAccess1(System.Object[] in, System.String in2)
<Method Name="CheckUserAccess1">
<FilterDescriptors>
<FilterDescriptor Name="fd" Type="UserContext"/>
</FilterDescriptors>
<Parameters>
<Parameter Name="in" Direction="In" >
<TypeDescriptor Name="in" TypeName="System.Object[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName=" + typeof(IdCase1).AssemblyQualifiedName + @" >
<TypeDescriptors>
<TypeDescriptor Name="Id1" TypeName="System.String" IdentifierName="id1"/>
<TypeDescriptor Name="Id2" TypeName="System.Int32" IdentifierName="id2"/>
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Name="in2" Direction="In" >
<TypeDescriptor Name="in" TypeName="System.String" AssociatedFilter="fd">
</TypeDescriptor>
</Parameter>
<Parameter Name="out" Direction="Return" >
<TypeDescriptor Name="out" TypeName="System.Int64[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName="System.Int64" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="CheckUserAccess1" Type="AccessChecker" ReturnParameterName="out" ReturnTypeDescriptorName="item" />
</MethodInstances>
</Method>
Web Service Example 2
This example assumes that the back-end API takes the IDs for a single entity instance and returns the rights the user has on that instance. Notice that a System.Int64 value is returned, which the Business Data Catalog will return to the calling Entity.CheckAccess method. In this example, the Business Data Catalog uses multithreading and instantiates as many threads as are needed to obtain the rights for all the entity instances requested in the Entity.CheckAccess method.
Following is how the back-end public method might look for this example:
public System.Int64 CheckUserAccess2(System.Int32 in1, System.Int32 in2)
<Method Name="CheckUserAccess2">
<Parameters>
<Parameter Name="in" Direction="In" >
<TypeDescriptor Name="in1" TypeName="System.String" IdentifierName="id1">
</TypeDescriptor>
</Parameter>
<Parameter Name="in2" Direction="In" >
<TypeDescriptor Name="in2" TypeName="System.Int32" IdentifierName="id2">
</TypeDescriptor>
</Parameter>
<Parameter Name="out" Direction="Return" >
<TypeDescriptor Name="out" TypeName="System.Int64">
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="CheckUserAccess2" Type="AccessChecker" ReturnParameterName="out" />
</MethodInstances>
</Method>
Web Service Example 3
This example assumes that the back-end API takes the IDs for a single entity instance and returns the rights the user has on that instance. Notice that a System.Int64[] array is returned by the back-end method. The Business Data Catalog will return it to the calling Entity.CheckAccess method. In this example, the Business Data Catalog uses multithreading and instantiates as many threads as are needed to obtain the rights for all the entity instances requested in the Entity.CheckAccess method.
Following is how the back-end public method might look for this example:
public System.Int64[] CheckUserAccess3(System.String in1, System.Int32 in2)
<Method Name="CheckUserAccess3">
<Parameters>
<Parameter Name="in" Direction="In" >
<TypeDescriptor Name="in1" TypeName="System.String" IdentifierName="id1">
</TypeDescriptor>
</Parameter>
<Parameter Name="in2" Direction="In" >
<TypeDescriptor Name="in2" TypeName="System.Int32" IdentifierName="id2">
</TypeDescriptor>
</Parameter>
<Parameter Name="out" Direction="Return" >
<TypeDescriptor Name="out" TypeName="System.Int64[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName="System.Int64" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="CheckUserAccess3" Type="AccessChecker" ReturnParameterName="out" ReturnTypeDescriptorName="item"/>
</MethodInstances>
</Method>
Web Service Example 4
This example assumes that the back-end API can take the IDs for several entity instances and return the rights the user has on all of those instances. Notice that a System.Int64[] array of values is returned, which the Business Data Catalog will return to the calling Entity.CheckAccess method.
Following is how the back-end public method might look for this example:
public System.Int64[] CheckUserAccess4(YourCompany.CustomTypes.IdCase4a[] in1, YourCompany.CustomTypes.IdCase4b[] in2)
Following is how the custom types used in this example might look:
class IdCase4a
{
public System.String Id1;
}
class IdCase4b
{
public System.String Id2;
}
<Method Name="CheckUserAccess4">
<Parameters>
<Parameter Name="in" Direction="In" >
<TypeDescriptor Name="in1" TypeName="YourCompany.CustomTypes.IdCase4a[], + typeof(IdCase4a).Assembly.FullName + @""" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName=" + typeof(IdCase4a).AssemblyQualifiedName + @" >
<TypeDescriptors>
<TypeDescriptor Name="Id1" TypeName="System.String" IdentifierName="id1"/>
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Name="in2" Direction="In" >
<TypeDescriptor Name="in2" TypeName="YourCompany.CustomTypes.IdCase4b[], + typeof(IdCase4b).Assembly.FullName + @""" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName=" + typeof(IdCase4b).AssemblyQualifiedName + @" >
<TypeDescriptors>
<TypeDescriptor Name="Id2" TypeName="System.Int32" IdentifierName="id2"/>
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Name="out" Direction="Return" >
<TypeDescriptor Name="out" TypeName="System.Int64[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName="System.Int64" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="CheckUserAccess4" Type="AccessChecker" ReturnParameterName="out" ReturnTypeDescriptorName="item" />
</MethodInstances>
</Method>
Web Service Example 5
This example assumes that the back-end API can take the IDs for several entity instances and return the rights the user has on all of those instances. Notice that a System.Int32[] array of values is returned, which the Business Data Catalog will convert to long[] before returning it to the Entity.CheckAccess method.
Following is how the back-end public method might look for this example:
public System.Int32 [] CheckUserAccess5(System.String[] in1, System.Int32[] in2)
Following is how the custom types used in this example might look:
class IdCase4a
{
public System.String Id1;
}
class IdCase4b
{
public System.String Id2;
}
<Method Name="CheckUserAccess5">
<Parameters>
<Parameter Name="in" Direction="In" >
<TypeDescriptor Name="in1" TypeName="System.String[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="Id1" TypeName="System.String" IdentifierName="id1"/>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Name="in2" Direction="In" >
<TypeDescriptor Name="in2" TypeName="System.Int32[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="Id2" TypeName="System.Int32" IdentifierName="id2"/>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Name="out" Direction="Return" >
<TypeDescriptor Name="out" TypeName="System.Int32 []" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName="System.Int32" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="CheckUserAccess5" Type="AccessChecker" ReturnParameterName="out" ReturnTypeDescriptorName="item" />
</MethodInstances>
</Method>
Web Service Example 6
This example assumes that the back-end API can take the IDs for several entity instances and return the rights the user has on all of those instances. Notice that a System.Int32[] array of values is returned, which the Business Data Catalog will convert to long[] before returning it to the Entity.CheckAccess method.
Following is how the back-end public method might look for this example:
public YourCompany.CustomTypes.ReturnContainer CheckUserAccess6(YourCompany.CustomTypes.IdContainer in1)
Here is how the custom types used in this example might look:
class IdContainer
{
public YourCompany.CustomTypes.IdCase6[] ids;
}
class IdCase6
{
public YourCompany.CustomTypes.IdCase1
item;
}
class IdCase1
{
public System.String Id1;
public System.Int32 Id2;
}
class ReturnContainer
{
public System.Int32[] ints;
}
<Method Name="CheckUserAccess6">
<Parameters>
<Parameter Name="in" Direction="In" >
<TypeDescriptor Name="in1" TypeName="YourCompany.CustomTypes.IdContainer, + typeof(IdCase4a).Assembly.FullName + @""" >
<TypeDescriptors>
<TypeDescriptor Name="ids" TypeName="YourCompany.CustomTypes.IdCase6[], + typeof(IdCase1).Assembly.FullName + @""" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName=" + typeof(IdCase1).AssemblyQualifiedName + @" >
<TypeDescriptors>
<TypeDescriptor Name="Id1" TypeName="System.String" IdentifierName="id1"/>
<TypeDescriptor Name="Id2" TypeName="System.Int32" IdentifierName="id2"/>
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Name="out" Direction="Return" >
<TypeDescriptor Name="out" TypeName=" + typeof(ReturnContainer).AssemblyQualifiedName + @" >
<TypeDescriptors>
<TypeDescriptor Name="ints" TypeName="System.Int32[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName="System.Int32" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="CheckUserAccess6" Type="AccessChecker" ReturnParameterName="out" ReturnTypeDescriptorName="item" />
</MethodInstances>
</Method>
Web Service Example 7
This example assumes that the back-end API can take the IDs for several entity instances and return the rights the user has on all of those instances. Notice that a System.Int64[] array of values is returned, which the Business Data Catalog will return to the calling Entity.CheckAccess method.
Following is how the back-end public method might look for this example:
public System.Int64[] CheckUserAccess7(System.Object[] in)
<Method Name="CheckUserAccess7">
<Parameters>
<Parameter Name="in" Direction="In" >
<TypeDescriptor Name="in" TypeName="System.Object[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName="System.Object[]" >
<TypeDescriptors>
<TypeDescriptor Name="Id1" TypeName="System.String" IdentifierName="id1"/>
<TypeDescriptor Name="Id2" TypeName="System.Int32" IdentifierName="id2"/>
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Name="out" Direction="Return" >
<TypeDescriptor Name="out" TypeName="System.Int64[]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="item" TypeName="System.Int64" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="CheckUserAccess7" Type="AccessChecker" ReturnParameterName="out" ReturnTypeDescriptorName="item" />
</MethodInstances>
</Method>