[jboss-jira] [JBoss JIRA] (WFLY-2263) Access control meta data: Instance references

Kabir Khan (JIRA) jira-events at lists.jboss.org
Wed Oct 9 13:00:03 EDT 2013


    [ https://issues.jboss.org/browse/WFLY-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12812469#comment-12812469 ] 

Kabir Khan edited comment on WFLY-2263 at 10/9/13 12:58 PM:
------------------------------------------------------------

Ah right, not a map like I thought when I looked quickly. So a list of property, where each property entry has the full address, and the access control. That should be possible. Something like this?
{code}
    public static void main(String[] args) {
        ModelNode node = new ModelNode();

        node.add("HostA", createEntry("Server-1", "HostA"));
        node.add("HostA", createEntry("Server-2", "HostA"));
        node.add("HostB", createEntry("Server-2", "HostB"));
        System.out.println(node);
    }

    private static ModelNode createEntry(String server, String host) {
        ModelNode node = new ModelNode();
        node.get("addresss").add("subsystem", "undertow");
        node.get("addresss").add("server", server);
        node.get("addresss").add("host", host);
        node.get("read").set(true);
        node.get("write").set(true);
        return node;
    }
{code}
Giving:
{code}
[
    ("HostA" => {
    "addresss" => [
        ("subsystem" => "undertow"),
        ("server" => "Server-1"),
        ("host" => "HostA")
    ],
    "read" => true,
    "write" => true
}),
    ("HostA" => {
    "addresss" => [
        ("subsystem" => "undertow"),
        ("server" => "Server-2"),
        ("host" => "HostA")
    ],
    "read" => true,
    "write" => true
}),
    ("HostB" => {
    "addresss" => [
        ("subsystem" => "undertow"),
        ("server" => "Server-2"),
        ("host" => "HostB")
    ],
    "read" => true,
    "write" => true
})
]
{code}

                
      was (Author: kabirkhan):
    Ah right, not a map like I thought when I looked quickly. So a list of property, where each property entry has the full address, and the access control. That should be possible. Something like this?
{code}
    public static void main(String[] args) {
        ModelNode node = new ModelNode();

        node.add("HostA", createEntry("Server-1", "HostA"));
        node.add("HostA", createEntry("Server-2", "HostA"));
        node.add("HostB", createEntry("Server-2", "HostB"));
        System.out.println(node);
    }

    private static ModelNode createEntry(String server, String host) {
        ModelNode node = new ModelNode();
        node.get("addresss").add("subsystem", "datasources");
        node.get("addresss").add("server", server);
        node.get("addresss").add("host", host);
        node.get("read").set(true);
        node.get("write").set(true);
        return node;
    }
{code}
Giving:
{code}
[
    ("HostA" => {
    "addresss" => [
        ("subsystem" => "undertow"),
        ("server" => "Server-1"),
        ("host" => "HostA")
    ],
    "read" => true,
    "write" => true
}),
    ("HostA" => {
    "addresss" => [
        ("subsystem" => "undertow"),
        ("server" => "Server-2"),
        ("host" => "HostA")
    ],
    "read" => true,
    "write" => true
}),
    ("HostB" => {
    "addresss" => [
        ("subsystem" => "undertow"),
        ("server" => "Server-2"),
        ("host" => "HostB")
    ],
    "read" => true,
    "write" => true
})
]
{code}

                  
> Access control meta data: Instance references
> ---------------------------------------------
>
>                 Key: WFLY-2263
>                 URL: https://issues.jboss.org/browse/WFLY-2263
>             Project: WildFly
>          Issue Type: Enhancement
>          Components: Domain Management
>            Reporter: Heiko Braun
>            Assignee: Brian Stansberry
>             Fix For: 8.0.0.CR1
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list