@Test public void getDhisResourceNotSet() { final WritableScriptedLazyDhisResource resource = new WritableScriptedLazyDhisResource( DhisResourceType.TRACKED_ENTITY, "6738", scriptExecutionContext ); Assert.assertNull( resource.getDhisResource() ); }
@ScriptExecutionForbidden @Nullable public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return resource; }
WritableScriptedLazyDhisResource extends AbstractWritableScriptedDhisResource implements AccessibleWritableScriptedLazyDhisResource { @ScriptExecutionForbidden @Nullable public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return resource; } }
WritableScriptedLazyDhisResource extends AbstractWritableScriptedDhisResource implements AccessibleWritableScriptedLazyDhisResource { @ScriptExecutionForbidden @Nullable public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return resource; } WritableScriptedLazyDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext );  WritableScriptedLazyDhisResource( @Nonnull DhisResourceType resourceType, @Nonnull String resourceId, @Nonnull ScriptExecutionContext scriptExecutionContext ); }
WritableScriptedLazyDhisResource extends AbstractWritableScriptedDhisResource implements AccessibleWritableScriptedLazyDhisResource { @ScriptExecutionForbidden @Nullable public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return resource; } WritableScriptedLazyDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext );  WritableScriptedLazyDhisResource( @Nonnull DhisResourceType resourceType, @Nonnull String resourceId, @Nonnull ScriptExecutionContext scriptExecutionContext ); @ScriptExecutionForbidden @Nullable DhisResource getDhisResource(); }
WritableScriptedLazyDhisResource extends AbstractWritableScriptedDhisResource implements AccessibleWritableScriptedLazyDhisResource { @ScriptExecutionForbidden @Nullable public DhisResource getDhisResource() { if ( scriptExecutionContext.hasScriptExecution() ) { throw new FatalTransformerException( "Resource instance cannot be accessed within script execution." ); } return resource; } WritableScriptedLazyDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext );  WritableScriptedLazyDhisResource( @Nonnull DhisResourceType resourceType, @Nonnull String resourceId, @Nonnull ScriptExecutionContext scriptExecutionContext ); @ScriptExecutionForbidden @Nullable DhisResource getDhisResource();  }