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


Java ApplicationPermissionMode类代码示例

本文整理汇总了Java中org.isisaddons.module.security.dom.permission.ApplicationPermissionMode的典型用法代码示例。如果您正苦于以下问题:Java ApplicationPermissionMode类的具体用法?Java ApplicationPermissionMode怎么用?Java ApplicationPermissionMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: execute

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
@Override
protected void execute(final ExecutionContext executionContext) {
    // regular members
    newMemberPermissions(
            ApplicationPermissionRule.VETO,
            ApplicationPermissionMode.VIEWING,
            ToDoItem.class,
            "updateCost");
    // contributed members
    newMemberPermissions(
            ApplicationPermissionRule.VETO,
            ApplicationPermissionMode.VIEWING,
            RelativePriorityService.class,
            "relativePriority", "next", "previous"
    );
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:17,代码来源:ToDoAppToDoItemVetoSelectedMembersPermissions.java

示例2: newPermissions

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
private void newPermissions(
        final ApplicationPermissionRule rule,
        final ApplicationPermissionMode mode,
        final ApplicationFeatureType featureType,
        final Iterable<String> featureFqns) {

    if(featureFqns == null) {
        return;
    }

    ApplicationRole securityRole = applicationRoleRepository.findByName(roleName);
    if(securityRole == null) {
        securityRole = applicationRoleRepository.newRole(roleName, roleDescription);
    }
    for (String featureFqn : featureFqns) {
        // can't use role#addPackage because that does a check for existence of the package, which is
        // not guaranteed to exist yet (the SecurityFeatures#init() may not have run).
        applicationPermissionRepository.newPermissionNoCheck(
                securityRole,
                rule,
                mode,
                featureType, featureFqn);
    }
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:25,代码来源:AbstractRoleAndPermissionsFixtureScript.java

示例3: PermissionForMember

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
/**
 * Expects in format <code>package:className:methodName:r|w</code>
 */
public PermissionForMember(String permissionString) {
    final String[] split = permissionString.split("\\:");
    if(split.length == 4) {
        String packageName = split[0];
        String className = split[1];
        String memberName = split[2];
        this.featureId = ApplicationFeatureId.newMember(packageName + "." + className, memberName);

        ApplicationPermissionMode mode = modeFrom(split[3]);
        if(mode != null) {
            this.mode = mode;
            return;
        }
    }
    throw new IllegalArgumentException("Invalid format for permission: " + permissionString + "; expected 'packageName:className:methodName:r|w");
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:20,代码来源:PermissionForMember.java

示例4: addPackage

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
/**
 * Adds a {@link org.isisaddons.module.security.dom.permission.ApplicationPermission permission} for this role to a
 * {@link ApplicationFeatureType#PACKAGE package}
 * {@link ApplicationFeature feature}.
 */
@Action(
        domainEvent = AddPackageDomainEvent.class,
        semantics = SemanticsOf.NON_IDEMPOTENT
)
@MemberOrder(name = "Permissions", sequence = "1")
public ApplicationRole addPackage(
        @ParameterLayout(named="Rule")
        final ApplicationPermissionRule rule,
        @ParameterLayout(named="Mode")
        final ApplicationPermissionMode mode,
        @ParameterLayout(named="Package", typicalLength= ApplicationFeature.TYPICAL_LENGTH_PKG_FQN)
        final String packageFqn) {
    applicationPermissionRepository.newPermission(this, rule, mode, ApplicationFeatureType.PACKAGE, packageFqn);
    return this;
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:21,代码来源:ApplicationRole.java

示例5: addClass

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
/**
 * Adds a {@link org.isisaddons.module.security.dom.permission.ApplicationPermission permission} for this role to a
 * {@link ApplicationFeatureType#MEMBER member}
 * {@link ApplicationFeature feature}.
 */
@Action(
        domainEvent = AddClassDomainEvent.class,
        semantics = SemanticsOf.NON_IDEMPOTENT
)
@MemberOrder(name = "Permissions", sequence = "2")
public ApplicationRole addClass(
        @ParameterLayout(named="Rule")
        final ApplicationPermissionRule rule,
        @ParameterLayout(named="Mode")
        final ApplicationPermissionMode mode,
        @ParameterLayout(named="Package", typicalLength=ApplicationFeature.TYPICAL_LENGTH_PKG_FQN)
        final String packageFqn,
        @ParameterLayout(named="Class", typicalLength=ApplicationFeature.TYPICAL_LENGTH_CLS_NAME)
        final String className) {
    applicationPermissionRepository.newPermission(this, rule, mode, ApplicationFeatureType.CLASS,
            packageFqn + "." + className);
    return this;
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:24,代码来源:ApplicationRole.java

示例6: addAction

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
/**
 * Adds a {@link org.isisaddons.module.security.dom.permission.ApplicationPermission permission} for this role to a
 * {@link ApplicationMemberType#ACTION action}
 * {@link ApplicationFeatureType#MEMBER member}
 * {@link ApplicationFeature feature}.
 */
@Action(
        domainEvent = AddActionDomainEvent.class,
        semantics = SemanticsOf.NON_IDEMPOTENT
)
@MemberOrder(name = "Permissions", sequence = "3")
public ApplicationRole addAction(
        @ParameterLayout(named="Rule")
        final ApplicationPermissionRule rule,
        @ParameterLayout(named="Mode")
        final ApplicationPermissionMode mode,
        @ParameterLayout(named="Package", typicalLength=ApplicationFeature.TYPICAL_LENGTH_PKG_FQN)
        final String packageFqn,
        @ParameterLayout(named="Class", typicalLength=ApplicationFeature.TYPICAL_LENGTH_CLS_NAME)
        final String className,
        @ParameterLayout(named="Action", typicalLength = ApplicationFeature.TYPICAL_LENGTH_MEMBER_NAME)
        final String memberName) {
    applicationPermissionRepository.newPermission(this, rule, mode, packageFqn, className, memberName);
    return this;
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:26,代码来源:ApplicationRole.java

示例7: addProperty

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
/**
 * Adds a {@link org.isisaddons.module.security.dom.permission.ApplicationPermission permission} for this role to a
 * {@link ApplicationMemberType#PROPERTY property}
 * {@link ApplicationFeatureType#MEMBER member}
 * {@link ApplicationFeature feature}.
 */
@Action(
        domainEvent = AddPropertyDomainEvent.class,
        semantics = SemanticsOf.NON_IDEMPOTENT
)
@MemberOrder(name = "Permissions", sequence = "4")
public ApplicationRole addProperty(
        @ParameterLayout(named="Rule")
        final ApplicationPermissionRule rule,
        @ParameterLayout(named="Mode")
        final ApplicationPermissionMode mode,
        @ParameterLayout(named="Package", typicalLength=ApplicationFeature.TYPICAL_LENGTH_PKG_FQN)
        final String packageFqn,
        @ParameterLayout(named="Class", typicalLength=ApplicationFeature.TYPICAL_LENGTH_CLS_NAME)
        final String className,
        @ParameterLayout(named="Property", typicalLength=ApplicationFeature.TYPICAL_LENGTH_MEMBER_NAME)
        final String memberName) {
    applicationPermissionRepository.newPermission(this, rule, mode, packageFqn, className, memberName);
    return this;
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:26,代码来源:ApplicationRole.java

示例8: addCollection

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
/**
 * Adds a {@link org.isisaddons.module.security.dom.permission.ApplicationPermission permission} for this role to a
 * {@link ApplicationMemberType#COLLECTION collection}
 * {@link ApplicationFeatureType#MEMBER member}
 * {@link ApplicationFeature feature}.
 */
@Action(
        domainEvent = AddCollectionDomainEvent.class,
        semantics = SemanticsOf.NON_IDEMPOTENT
)
@MemberOrder(name = "Permissions", sequence = "5")
public ApplicationRole addCollection(
        @ParameterLayout(named="Rule")
        final ApplicationPermissionRule rule,
        @ParameterLayout(named="Mode")
        final ApplicationPermissionMode mode,
        @ParameterLayout(named="Package", typicalLength=ApplicationFeature.TYPICAL_LENGTH_PKG_FQN)
        final String packageFqn,
        @ParameterLayout(named="Class", typicalLength=ApplicationFeature.TYPICAL_LENGTH_CLS_NAME)
        final String className,
        @ParameterLayout(named="Collection", typicalLength=ApplicationFeature.TYPICAL_LENGTH_MEMBER_NAME)
        final String memberName) {
    applicationPermissionRepository.newPermission(this, rule, mode, packageFqn, className, memberName);
    return this;
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:26,代码来源:ApplicationRole.java

示例9: execute

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
@Override
protected void execute(final ExecutionContext executionContext) {
    newPackagePermissions(
            ApplicationPermissionRule.ALLOW,
            ApplicationPermissionMode.CHANGING,
            "org.isisaddons.module.command");
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:8,代码来源:CommandModuleRoleAndPermissions.java

示例10: execute

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
@Override
protected void execute(final ExecutionContext executionContext) {
    newPackagePermissions(
            ApplicationPermissionRule.ALLOW,
            ApplicationPermissionMode.CHANGING,
            "org.isisaddons.module.audit");
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:8,代码来源:AuditModuleRoleAndPermissions.java

示例11: execute

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
@Override
protected void execute(ExecutionContext executionContext) {
    newPackagePermissions(
            ApplicationPermissionRule.ALLOW,
            ApplicationPermissionMode.CHANGING,
            "org.incode.eurocommercial.ecpcrm.fixture"
    );
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:9,代码来源:EcpCrmFixtureServiceRoleAndPermissions.java

示例12: execute

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
@Override
protected void execute(final ExecutionContext executionContext) {
    newPackagePermissions(
            ApplicationPermissionRule.ALLOW,
            ApplicationPermissionMode.CHANGING,
            "org.isisaddons.module.settings");
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:8,代码来源:SettingsModuleRoleAndPermissions.java

示例13: execute

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
@Override
protected void execute(final ExecutionContext executionContext) {
    newPackagePermissions(
            ApplicationPermissionRule.ALLOW,
            ApplicationPermissionMode.CHANGING,
            "org.incode.eurocommercial.ecpcrm.app",
            "org.incode.eurocommercial.ecpcrm.dom"
    );
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:10,代码来源:EcpCrmRegularRoleAndPermissions.java

示例14: execute

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
@Override
protected void execute(final ExecutionContext executionContext) {
    newPackagePermissions(
            ApplicationPermissionRule.ALLOW,
            ApplicationPermissionMode.CHANGING,
            "org.isisaddons.module.devutils");
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:8,代码来源:DevUtilsModuleRoleAndPermissions.java

示例15: execute

import org.isisaddons.module.security.dom.permission.ApplicationPermissionMode; //导入依赖的package包/类
@Override
protected void execute(final ExecutionContext executionContext) {
    newPackagePermissions(
            ApplicationPermissionRule.ALLOW,
            ApplicationPermissionMode.CHANGING,
            "org.isisaddons.module.publishing");
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:8,代码来源:PublishingModuleRoleAndPermissions.java


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