@Test public void getDhisResource() { final TrackedEntityInstance resource = new TrackedEntityInstance(); final WritableScriptedDhisResource scriptedResource = new WritableScriptedDhisResource( resource, scriptExecutionContext ); Assert.assertSame( resource, scriptedResource.getDhisResource() ); }
@ScriptExecutionForbidden @Nonnull public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return getInternalResource(); }
WritableScriptedDhisResource extends AbstractWritableScriptedDhisResource implements AccessibleScriptedDhisResource { @ScriptExecutionForbidden @Nonnull public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return getInternalResource(); } }
WritableScriptedDhisResource extends AbstractWritableScriptedDhisResource implements AccessibleScriptedDhisResource { @ScriptExecutionForbidden @Nonnull public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return getInternalResource(); } WritableScriptedDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext ); }
WritableScriptedDhisResource extends AbstractWritableScriptedDhisResource implements AccessibleScriptedDhisResource { @ScriptExecutionForbidden @Nonnull public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return getInternalResource(); } WritableScriptedDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext ); @ScriptExecutionForbidden @Nonnull DhisResource getDhisResource(); }
WritableScriptedDhisResource extends AbstractWritableScriptedDhisResource implements AccessibleScriptedDhisResource { @ScriptExecutionForbidden @Nonnull public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return getInternalResource(); } WritableScriptedDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext ); @ScriptExecutionForbidden @Nonnull DhisResource getDhisResource();  }