RepositoryFileProxy extends RepositoryFile { @Override public Boolean isSchedulable() { if ( schedulable == null ) { this.executeOperation( session -> { try { Map<String, Serializable> metadataIsSchedulable = getMetadata(); if ( metadataIsSchedulable != null ) { schedulable = metadataIsSchedulable.get( SCHEDULABLE_KEY ) != null ? BooleanUtils.toBoolean( (String) metadataIsSchedulable.get( SCHEDULABLE_KEY ) ) : null; } } catch ( Exception e ) { getLogger().error( Messages.getInstance().getString( REPOSITORY_EXCEPTION_WAS_FOUND_MESSAGE ), e ); } } ); } return schedulable == null ? SCHEDULABLE_BY_DEFAULT : schedulable; } RepositoryFileProxy( final Node node, final JcrTemplate template, IPentahoLocale pentahoLocale ); static Logger getLogger(); @Override int compareTo( RepositoryFile other ); @Override boolean equals( Object obj ); @Override Date getCreatedDate(); Map<String, Serializable> getMetadata(); void setMetadata( Map<String, Serializable> metadata ); @Override String getCreatorId(); @Override String getDescription(); @Override Long getFileSize(); @Override Serializable getId(); @Override Date getLastModifiedDate(); @Override String getLocale(); @Override Map<String, Properties> getLocalePropertiesMap(); @Override Date getLockDate(); @Override String getLockMessage(); @Override String getLockOwner(); @Override String getName(); @Override String getPath(); @Override String getTitle(); @Override Serializable getVersionId(); @Override int hashCode(); @Override boolean isFolder(); @Override Boolean isHidden(); @Override Boolean isSchedulable(); @Override boolean isLocked(); @Override boolean isVersioned(); @Override boolean isAclNode(); @Override String toString();  }
@Test public void testDefaultLogic_IfNoIsSchedulableInMetadata() { assertTrue( repoFileProxySpy.isSchedulable() ); }
@Test public void testSchedulable_IfIsSchedulableTrueInMetadata() { metadata.put( RepositoryFile.SCHEDULABLE_KEY, "true" ); assertTrue( repoFileProxySpy.isSchedulable() ); }
@Test public void testNotSchedulable_IfIsSchedulableFalseInMetadata() { metadata.put( RepositoryFile.SCHEDULABLE_KEY, "false" ); assertFalse( repoFileProxySpy.isSchedulable() ); }