org.codehaus.plexus.redback.rbac.Operation.isPermanent()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中org.codehaus.plexus.redback.rbac.Operation.isPermanent()方法的一些代码示例,展示了Operation.isPermanent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operation.isPermanent()方法的具体详情如下:
包路径:org.codehaus.plexus.redback.rbac.Operation
类名称:Operation
方法名:isPermanent

Operation.isPermanent介绍

[英]Test to see if the object is a permanent object or not.
[中]测试该对象是否为永久性对象。

代码示例

代码示例来源:origin: org.codehaus.redback/redback-xmlrpc-services

  1. public List<Operation> getOperations()
  2. throws Exception
  3. {
  4. List<org.codehaus.plexus.redback.rbac.Operation> operations = rbacManager.getAllOperations();
  5. List<Operation> simpleOperations = new ArrayList<Operation>();
  6. for ( org.codehaus.plexus.redback.rbac.Operation operation : operations )
  7. {
  8. simpleOperations.add(
  9. new Operation( operation.getName(), operation.getDescription(), operation.isPermanent() ) );
  10. }
  11. return simpleOperations;
  12. }

代码示例来源:origin: org.codehaus.redback/redback-rbac-jdo

  1. public void removeOperation( Operation operation )
  2. throws RbacObjectNotFoundException, RbacObjectInvalidException, RbacManagerException
  3. {
  4. RBACObjectAssertions.assertValid( operation );
  5. if ( operation.isPermanent() )
  6. {
  7. throw new RbacPermanentException( "Unable to delete permanent operation [" + operation.getName() + "]" );
  8. }
  9. jdo.removeObject( operation );
  10. }

代码示例来源:origin: org.codehaus.redback/redback-xmlrpc-services

  1. public Operation getOperation( String operationName )
  2. throws Exception
  3. {
  4. org.codehaus.plexus.redback.rbac.Operation operation = rbacManager.getOperation( operationName );
  5. Operation simpleOperation =
  6. new Operation( operation.getName(), operation.getDescription(), operation.isPermanent() );
  7. return simpleOperation;
  8. }

代码示例来源:origin: org.codehaus.redback/redback-rbac-memory

  1. public void removeOperation( Operation operation )
  2. throws RbacObjectNotFoundException, RbacManagerException
  3. {
  4. RBACObjectAssertions.assertValid( "Remove Operation", operation );
  5. if ( operation.isPermanent() )
  6. {
  7. throw new RbacPermanentException( "Unable to delete permanent operation [" + operation.getName() + "]" );
  8. }
  9. assertOpertionExists( operation.getName() );
  10. operations.remove( operation.getName() );
  11. }

相关文章