private int getDampeningTimeout() { if ( dampeningTimeout == null ) { dampeningTimeout = 0; ISystemConfig iSystemConfig = PentahoSystem.get( ISystemConfig.class ); if ( iSystemConfig != null ) { String property = iSystemConfig.getProperty( "system.dampening-timeout" ); if ( property != null ) { dampeningTimeout = Integer.valueOf( property ); } } } return dampeningTimeout; }
/** * Overridden to: * <ul> * <li>Store {@code configuration} for later passing to {@link PentahoEntryCollector}.</li> * <li>Add JCR_READ_ACCESS_CONTROL to root ACL. This is harmless and avoids more customization.</li> * </ul> */ @Override @SuppressWarnings( "rawtypes" ) public void init( final Session systemSession, final Map conf ) throws RepositoryException { this.configuration = conf; ISystemConfig settings = PentahoSystem.get( ISystemConfig.class ); if ( settings != null ) { useCachingEntryCollector = "true".equals( settings.getProperty( "system.cachingEntryCollector" ) ); } super.init( systemSession, conf ); // original initRootACL should run during super.init call above updateRootAcl( (SessionImpl) systemSession, new ACLEditor( session, this, false /* allowUnknownPrincipals */ ) ); this.initialized = true; registerEntryCollectorWithObservationManager( systemSession ); }
when( config.getProperty( "system.dampening-timeout" ) ).thenReturn( "3000" );
RepositoryFile.Builder newFolder = new RepositoryFile.Builder( username ).folder( true ); String hidePropertyValue = PentahoSystem.get( ISystemConfig.class ) .getProperty( PentahoSystem.HIDE_USER_HOME_FOLDER_ON_CREATION_PROPERTY ); Boolean hideUserHomeFolder = hidePropertyValue != null && "true".equals( hidePropertyValue.toLowerCase() ); newFolder = newFolder.hidden( hideUserHomeFolder );