当前位置: 首页>>代码示例>>Java>>正文


Java ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION属性代码示例

本文整理汇总了Java中org.jboss.as.controller.descriptions.ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION属性的典型用法代码示例。如果您正苦于以下问题:Java ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION属性的具体用法?Java ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION怎么用?Java ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.jboss.as.controller.descriptions.ModelDescriptionConstants的用法示例。


在下文中一共展示了ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAccessConstraintUtilizations

private Map<PathAddress, AccessConstraintUtilization> getAccessConstraintUtilizations() {
    boolean core = ModelDescriptionConstants.CORE.equals(classificationType);
    AccessConstraintKey key =
            new AccessConstraintKey(ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION,
                    core, core ? null : classificationType, getPathElement().getValue());
    return registry.getAccessConstraintUtilizations(key);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:7,代码来源:SensitivityResourceDefinition.java

示例2: SensitiveTargetAccessConstraintDefinition

public SensitiveTargetAccessConstraintDefinition(SensitivityClassification sensitivity) {
    // Register this sensitivity, and if a compatible one is already registered, use that instead
    final SensitivityClassification toUse = SensitiveTargetConstraint.FACTORY.addSensitivity(sensitivity);
    this.sensitivity = toUse;
    this.key = new AccessConstraintKey(ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION, toUse.isCore(),
            toUse.getSubsystem(), toUse.getName());
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:7,代码来源:SensitiveTargetAccessConstraintDefinition.java

示例3: testConstraintUtilization

@Test
public void testConstraintUtilization() throws Exception {
    ModelControllerClient client = testSupport.getDomainMasterLifecycleUtil().getDomainClient();
    for (ExpectedDef expectedDef : EXPECTED_DEFS) {
        AccessConstraintKey acdKey = expectedDef.key;
        String constraint = ModelDescriptionConstants.SENSITIVE.equals(acdKey.getType())
                ? ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION
                : ModelDescriptionConstants.APPLICATION_CLASSIFICATION;
        String acdType = acdKey.isCore() ? "core" : acdKey.getSubsystemName();
        String path = String.format(ADDR_FORMAT, acdKey.getType(), acdType, acdKey.getName());
        ModelNode op = createOpNode(path, READ_CHILDREN_RESOURCES_OPERATION);
        op.get(ModelDescriptionConstants.CHILD_TYPE).set(ModelDescriptionConstants.APPLIES_TO);
        System.out.println("Testing " + acdKey);
        ModelNode result = RbacUtil.executeOperation(client, op, Outcome.SUCCESS).get(ModelDescriptionConstants.RESULT);
        Assert.assertTrue(acdKey + "result is defined", result.isDefined());
        Assert.assertTrue(acdKey + "result has content", result.asInt() > 0);
        boolean foundResource = false;
        boolean foundAttr = false;
        boolean foundOps = false;
        for (Property prop : result.asPropertyList()) {
            ModelNode pathResult = prop.getValue();
            if (pathResult.get(ModelDescriptionConstants.ENTIRE_RESOURCE).asBoolean()) {
                Assert.assertTrue(acdKey + " -- " + prop.getName() + " resource", expectedDef.expectResource);
                foundResource = true;
            }
            ModelNode attrs = pathResult.get(ATTRIBUTES);
            if (attrs.isDefined() && attrs.asInt() > 0) {
                Assert.assertTrue(acdKey + " -- " + prop.getName() + " attributes = " + attrs.asString(), expectedDef.expectAttributes);
                foundAttr = true;
            }
            ModelNode ops = pathResult.get(OPERATIONS);
            if (ops.isDefined() && ops.asInt() > 0) {
                Assert.assertTrue(acdKey + " -- " + prop.getName() + " operations = " + ops.asString(), expectedDef.expectOps);
                foundOps = true;
            }
        }

        Assert.assertEquals(acdKey + " -- resource", expectedDef.expectResource, foundResource);
        Assert.assertEquals(acdKey + " -- attributes", expectedDef.expectAttributes, foundAttr);
        Assert.assertEquals(acdKey + " -- operations", expectedDef.expectOps, foundOps);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:42,代码来源:AccessConstraintUtilizationTestCase.java

示例4: getSensKey

private static AccessConstraintKey getSensKey(String subsystemName, String name) {
    return new AccessConstraintKey(ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION, false, subsystemName, name);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:3,代码来源:AccessConstraintUtilizationTestCase.java


注:本文中的org.jboss.as.controller.descriptions.ModelDescriptionConstants.SENSITIVITY_CLASSIFICATION属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。