Monday 4 March 2013

Access Policies for Controller Command

1) Below is the policies content of a Controller Command, copy the content to an xml file and run acpload command

<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE Policies SYSTEM "../dtd/accesscontrolpolicies.dtd">
<Policies>
    <Action Name="ExecuteCommand" CommandName="Execute"></Action>
    <ResourceCategory
        Name="com.mycompany.commands.MyCatalogControllerCmdResourceCategory"
        ResourceBeanClass="com.mycompany.commands.MyCatalogControllerCmd">
        <ResourceAction Name="ExecuteCommand" />
    </ResourceCategory>

    <ResourceGroup Name="AllSiteUserCmdResourceGroup" OwnerID="RootOrganization">
        <ResourceGroupResource
            Name="com.mycompany.commands.MyCatalogControllerCmdResourceCategory" />
    </ResourceGroup>
</Policies>

2) acpload command as below:
     a)open <WCS_installed_folder>\bin
     b)acpload <dbname> <userid> <password> <policies xml file> <schema>

3)acpload command makes entries to acrescgry, acresact, acresgpres tables, that  exposes  the  controller to application, if there are any errors/exceptions or due to any other problem acpload fails to run properly we can't access controller command.