@Override public void set( Object newValue ) throws IllegalArgumentException, IllegalStateException { next.set( newValue ); }
public static Property<Float> add( Property<Float> property, float amount ) { property.set( property.get() + amount ); return property; }
public static Property<Integer> mult( Property<Integer> property, int amount ) { property.set( property.get() * amount ); return property; }
public static Property<Long> div( Property<Long> property, long amount ) { property.set( property.get() / amount ); return property; }
public static Property<Double> div( Property<Double> property, double amount ) { property.set( property.get() / amount ); return property; }
public static Property<BigDecimal> add( Property<BigDecimal> property, BigDecimal amount ) { property.set( property.get().add( amount ) ); return property; }
public static Property<BigDecimal> sub( Property<BigDecimal> property, BigDecimal amount ) { property.set( property.get().subtract( amount ) ); return property; }
public static Property<Long> sub( Property<Long> property, long amount ) { property.set( property.get() - amount ); return property; }
public static Property<Double> mult( Property<Double> property, double amount ) { property.set( property.get() * amount ); return property; }
public static Property<Float> div( Property<Float> property, float amount ) { property.set( property.get() / amount ); return property; }
public static Property<BigDecimal> div( Property<BigDecimal> property, BigDecimal amount ) { property.set( property.get().divide( amount ) ); return property; } }
public static Property<Long> add( Property<Long> property, long amount ) { property.set( property.get() + amount ); return property; }
private void setStandardStuff( LogType type, Composite composite, String category, String message, LogRecord state, List<Serializable> params ) { state.logtype().set( type ); state.time().set( System.currentTimeMillis() ); state.category().set( category ); state.message().set( message ); state.compositeTypeName().set( getCompositeName( composite ) ); state.threadName().set( Thread.currentThread().getName() ); state.parameters().set( params ); }
private static String getRepositoryUrl( HttpRepositoryConfiguration configuration ) { Property<String> repositoryUrl = configuration.repositoryUrl(); String url = repositoryUrl.get(); if( url == null ) { url = "http://localhost:8183/"; repositoryUrl.set( url ); } return url; }
@Override public RestListValue newListRepresentationValue( Reference listRef, int start, Iterable<RestValue> items ) { ValueBuilder<RestListValue> builder = vbf.newValueBuilder( RestListValue.class ); RestListValue listRepresentation = builder.prototype(); listRepresentation.uri().set( listRef.toString() ); listRepresentation.start().set( start ); for ( RestValue eachItem : items ) { listRepresentation.items().get().add( eachItem ); } return builder.newInstance(); }
private CronSchedule newTransientCronSchedule( Task task, String cronExpression, DateTime start ) { ValueBuilder<CronSchedule> builder = module.newValueBuilder( CronSchedule.class ); CronSchedule prototype = builder.prototype(); prototype.task().set( task ); prototype.start().set( start ); prototype.identity().set( uuid.generate( CronSchedule.class ) ); prototype.cronExpression().set( cronExpression ); CronSchedule schedule = builder.newInstance(); logger.info( "Schedule {} created: {}", schedule.presentationString(), schedule.identity().get() ); return schedule; }
private BarEntity buildBarEntity( String cathedral ) { EntityBuilder<BarEntity> barBuilder = module.currentUnitOfWork().newEntityBuilder( BarEntity.class ); barBuilder.instance().cathedral().set( cathedral ); return barBuilder.newInstance(); }
@Override public EscrowedKeyPair create( AsymetricAlgorithm algorithm, Integer length ) { EntityBuilder<EscrowedKeyPair> builder = uowf.currentUnitOfWork().newEntityBuilder( EscrowedKeyPair.class ); EscrowedKeyPair ekp = builder.instance(); ekp.algorithm().set( algorithm ); ekp.length().set( length ); ekp = builder.newInstance(); KeyPair keyPair = asymGenerator.generateKeyPair( new AsymetricGeneratorParameters( algorithm, length ) ); writeToFile( cryptIO.asPEM( keyPair ), ekp.managedFile() ); return ekp; }
@Override public X509ProfileValue x509Profile( X509Profile x509Profile ) { ValueBuilder<X509ProfileValue> x509ProfileValueBuilder = vbf.newValueBuilder( X509ProfileValue.class ); CaUriBuilder caUriBuilder = new CaUriBuilder( restApi.apiRootRef() ); X509ProfileValue x509ProfileValue = x509ProfileValueBuilder.prototype(); x509ProfileValue.uri().set( caUriBuilder.x509Profile().withIdentity( x509Profile.identity().get() ).build() ); x509ProfileValue.name().set( x509Profile.name().get() ); x509ProfileValue.validityDays().set( x509Profile.validityDays().get() ); return x509ProfileValueBuilder.newInstance(); }
@Override public CryptoStoreValue cryptoStore( CryptoStore cs ) { ValueBuilder<CryptoStoreValue> ksValueBuilder = vbf.newValueBuilder( CryptoStoreValue.class ); CaUriBuilder caUriBuilder = new CaUriBuilder( restApi.apiRootRef() ); CryptoStoreValue ksValue = ksValueBuilder.prototype(); ksValue.uri().set( caUriBuilder.cryptoStore().withIdentity( cs.identity().get() ).build() ); ksValue.name().set( cs.name().get() ); ksValue.storeType().set( cs.storeType().get() ); return ksValueBuilder.newInstance(); }