@Test public void testAccess() throws Exception { when( mockAclService.hasAccess( mockObjectId, RepositoryFilePermission.READ ) ).thenReturn( true ); when( mockAclService.hasAccess( mockObjectId, RepositoryFilePermission.WRITE ) ).thenReturn( false ); assertTrue( uiJob.hasAccess( RepositoryFilePermission.READ ) ); assertFalse( uiJob.hasAccess( RepositoryFilePermission.WRITE ) ); }
@Override public boolean hasAccess( RepositoryFilePermission perm ) throws KettleException { if ( hasAccess == null ) { hasAccess = new HashMap<RepositoryFilePermission, Boolean>(); } if ( hasAccess.get( perm ) == null ) { hasAccess.put( perm, new Boolean( aclService.hasAccess( repObj.getObjectId(), perm ) ) ); } return hasAccess.get( perm ).booleanValue(); }
UIEEJob extends UIJob implements ILockObject, IRevisionObject, IAclObject, java.io.Serializable { @Override public boolean hasAccess( RepositoryFilePermission perm ) throws KettleException { if ( hasAccess == null ) { hasAccess = new HashMap<RepositoryFilePermission, Boolean>(); } if ( hasAccess.get( perm ) == null ) { hasAccess.put( perm, new Boolean( aclService.hasAccess( repObj.getObjectId(), perm ) ) ); } return hasAccess.get( perm ).booleanValue(); } }
UIEEJob extends UIJob implements ILockObject, IRevisionObject, IAclObject, java.io.Serializable { @Override public boolean hasAccess( RepositoryFilePermission perm ) throws KettleException { if ( hasAccess == null ) { hasAccess = new HashMap<RepositoryFilePermission, Boolean>(); } if ( hasAccess.get( perm ) == null ) { hasAccess.put( perm, new Boolean( aclService.hasAccess( repObj.getObjectId(), perm ) ) ); } return hasAccess.get( perm ).booleanValue(); } UIEEJob( RepositoryElementMetaInterface rc, UIRepositoryDirectory parent, Repository rep ); }
UIEEJob extends UIJob implements ILockObject, IRevisionObject, IAclObject, java.io.Serializable { @Override public boolean hasAccess( RepositoryFilePermission perm ) throws KettleException { if ( hasAccess == null ) { hasAccess = new HashMap<RepositoryFilePermission, Boolean>(); } if ( hasAccess.get( perm ) == null ) { hasAccess.put( perm, new Boolean( aclService.hasAccess( repObj.getObjectId(), perm ) ) ); } return hasAccess.get( perm ).booleanValue(); } UIEEJob( RepositoryElementMetaInterface rc, UIRepositoryDirectory parent, Repository rep ); @Override String getImage(); String getLockMessage(); void lock( String lockNote ); void unlock(); boolean isLocked(); RepositoryLock getRepositoryLock(); UIRepositoryObjectRevisions getRevisions(); void restoreRevision( UIRepositoryObjectRevision revision, String commitMessage ); void getAcls( UIRepositoryObjectAcls acls, boolean forceParentInheriting ); void getAcls( UIRepositoryObjectAcls acls ); void setAcls( UIRepositoryObjectAcls security ); @Override void clearAcl(); @Override boolean hasAccess( RepositoryFilePermission perm ); @Override Boolean getVersioningEnabled(); @Override Boolean getVersionCommentEnabled(); }
UIEEJob extends UIJob implements ILockObject, IRevisionObject, IAclObject, java.io.Serializable { @Override public boolean hasAccess( RepositoryFilePermission perm ) throws KettleException { if ( hasAccess == null ) { hasAccess = new HashMap<RepositoryFilePermission, Boolean>(); } if ( hasAccess.get( perm ) == null ) { hasAccess.put( perm, new Boolean( aclService.hasAccess( repObj.getObjectId(), perm ) ) ); } return hasAccess.get( perm ).booleanValue(); } UIEEJob( RepositoryElementMetaInterface rc, UIRepositoryDirectory parent, Repository rep ); @Override String getImage(); String getLockMessage(); void lock( String lockNote ); void unlock(); boolean isLocked(); RepositoryLock getRepositoryLock(); UIRepositoryObjectRevisions getRevisions(); void restoreRevision( UIRepositoryObjectRevision revision, String commitMessage ); void getAcls( UIRepositoryObjectAcls acls, boolean forceParentInheriting ); void getAcls( UIRepositoryObjectAcls acls ); void setAcls( UIRepositoryObjectAcls security ); @Override void clearAcl(); @Override boolean hasAccess( RepositoryFilePermission perm ); @Override Boolean getVersioningEnabled(); @Override Boolean getVersionCommentEnabled();  }