DataRoleImpl extends RelationalObjectImpl implements DataRole { @Override public Permission addPermission( final UnitOfWork transaction, final String permissionName ) throws KException { return RelationalModelFactory.createPermission( transaction, getRepository(), this, permissionName ); } DataRoleImpl( final UnitOfWork uow,
                         final Repository repository,
                         final String workspacePath ); @Override KomodoType getTypeIdentifier(UnitOfWork uow); @Override String[] addMappedRole( final UnitOfWork transaction,
                                   final String roleNameToAdd ); @Override Permission addPermission( final UnitOfWork transaction,
                                     final String permissionName ); @Override KomodoObject getChild( final UnitOfWork transaction,
                                  final String name ); @Override KomodoObject getChild( final UnitOfWork transaction,
                                  final String name,
                                  final String typeName ); @Override KomodoObject[] getChildren( final UnitOfWork transaction,
                                       final String... namePatterns ); @Override KomodoObject[] getChildrenOfType( final UnitOfWork transaction,
                                             final String type,
                                             final String... namePatterns ); @Override KomodoType[] getChildTypes(); @Override String getDescription( final UnitOfWork uow ); @Override String[] getMappedRoles( final UnitOfWork transaction,
                                    final String... namePatterns ); @Override Vdb getParent( final UnitOfWork transaction ); @Override Permission[] getPermissions( final UnitOfWork transaction,
                                        final String... namePatterns ); @Override int getTypeId(); @Override boolean hasChild( final UnitOfWork transaction,
                             final String name ); @Override boolean hasChild( final UnitOfWork transaction,
                             final String name,
                             final String typeName ); @Override boolean hasChildren( final UnitOfWork transaction ); @Override boolean isAllowCreateTempTables( final UnitOfWork uow ); @Override boolean isAnyAuthenticated( final UnitOfWork uow ); @Override boolean isGrantAll( final UnitOfWork uow ); @Override String[] removeMappedRole( final UnitOfWork transaction,
                                      final String roleNameToRemove ); @Override void removePermission( final UnitOfWork transaction,
                                  final String permissionToRemove ); @Override void setAllowCreateTempTables( final UnitOfWork uow,
                                          final boolean newAllowCreateTempTables ); @Override void setAnyAuthenticated( final UnitOfWork uow,
                                     final boolean newAnyAuthenticated ); @Override void setDescription( final UnitOfWork uow,
                                final String newDescription ); @Override void setGrantAll( final UnitOfWork uow,
                             final boolean newGrantAll );  }
@Test( expected = IllegalArgumentException.class ) public void shouldNotBeAbleToAddEmptyPermission() throws Exception { this.dataRole.addPermission( getTransaction(), StringConstants.EMPTY_STRING ); }
@Test( expected = IllegalArgumentException.class ) public void shouldNotBeAbleToAddNullPermission() throws Exception { this.dataRole.addPermission( getTransaction(), null ); }