@Test public void shouldObtainPropertyDescriptorOfStandardOption() throws Exception { final String standard = this.function.getStandardOptions().keySet().iterator().next(); this.function.setStatementOption( getTransaction(), standard, "blah" ); assertThat( this.function.getPropertyDescriptor( getTransaction(), standard ), is( notNullValue() ) ); assertThat( this.function.getPropertyDescriptor( getTransaction(), standard ).getName(), is( standard ) ); }
@Override public Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; }
UserDefinedFunctionImpl extends FunctionImpl implements UserDefinedFunction { @Override public Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; } }
UserDefinedFunctionImpl extends FunctionImpl implements UserDefinedFunction { @Override public Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; } UserDefinedFunctionImpl( final UnitOfWork uow,
                                    final Repository repository,
                                    final String workspacePath ); }
UserDefinedFunctionImpl extends FunctionImpl implements UserDefinedFunction { @Override public Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; } UserDefinedFunctionImpl( final UnitOfWork uow,
                                    final Repository repository,
                                    final String workspacePath ); @Override String getCategory( final UnitOfWork transaction ); @Override String getJavaClass( final UnitOfWork transaction ); @Override String getJavaMethod( final UnitOfWork transaction ); @Override Map< String, String > getStandardOptions(); @Override int getTypeId(); @Override KomodoType getTypeIdentifier( final UnitOfWork uow ); @Override Model getParent( final UnitOfWork transaction ); @Override boolean isStandardOption( final String name ); @Override void setCategory( final UnitOfWork transaction,
                             final String newCategory ); @Override void setJavaClass( final UnitOfWork transaction,
                              final String newJavaClass ); @Override void setJavaMethod( final UnitOfWork transaction,
                               final String newJavaMethod ); }
UserDefinedFunctionImpl extends FunctionImpl implements UserDefinedFunction { @Override public Map< String, String > getStandardOptions() { if ( _defaultValues == null ) { final Map< String, String > superOptions = super.getStandardOptions(); final Map< String, String > options = StandardOption.defaultValues(); final Map< String, String > combined = new HashMap< >( superOptions.size() + options.size() ); combined.putAll( superOptions ); combined.putAll( options ); _defaultValues = Collections.unmodifiableMap( combined ); } return _defaultValues; } UserDefinedFunctionImpl( final UnitOfWork uow,
                                    final Repository repository,
                                    final String workspacePath ); @Override String getCategory( final UnitOfWork transaction ); @Override String getJavaClass( final UnitOfWork transaction ); @Override String getJavaMethod( final UnitOfWork transaction ); @Override Map< String, String > getStandardOptions(); @Override int getTypeId(); @Override KomodoType getTypeIdentifier( final UnitOfWork uow ); @Override Model getParent( final UnitOfWork transaction ); @Override boolean isStandardOption( final String name ); @Override void setCategory( final UnitOfWork transaction,
                             final String newCategory ); @Override void setJavaClass( final UnitOfWork transaction,
                              final String newJavaClass ); @Override void setJavaMethod( final UnitOfWork transaction,
                               final String newJavaMethod );  }