public static EIEntity getStateEntity(final String status) { for (WorkflowState state : values()) { if ( state.getLabel().equalsIgnoreCase( status ) ) { return state.getEntity(); } } return EIEntity.NULL_ENTITY; } }
private void initWorkflowFilter(final EIEntity filterWorkflowEntity) { statusFilter.setVisible( true ); statusLabel.setVisible( true ); statusFilter.addItem( genericOption ); for (final WorkflowState state : WorkflowState.values()) { statusFilter.addItem( state.getLabel(), state.getUri().toString() ); if ( state.getEntity().equals( filterWorkflowEntity ) ) { statusFilter.setSelectedIndex( statusFilter.getItemCount() - 1 ); } } }
@Override public void onSuccess(final Void result) { log.debug( "creation succeeded" ); instance.setWFState( WorkflowState.DRAFT.getEntity() ); callback.onSuccess( instance ); } } );
@Override public void onSuccess(final Void result) { log.debug( "creation succeeded" ); // Too bad we have to hard code this first state // It's needed for bootstrapping permissions (a transition from draft to // draft means edit permission) instance.setWFState( WorkflowState.DRAFT.getEntity() ); callback.onSuccess( instance ); } } );
@Override public void onSuccess(final Void result) { log.debug( "creation succeeded" ); for (final EIInstance instance : instances) { // Too bad we have to hard code this first state // It's needed for bootstrapping permissions (a transition from draft // to draft means edit permission) instance.setWFState( WorkflowState.DRAFT.getEntity() ); } callback.onSuccess( instances ); } } );
@Override public void onSuccess(final EIInstance instance) { instance.setWFOwner( securityProxy.getUser().getUserEntity() ); // Too bad we have to hard code this first state // It's needed for bootstrapping permissions (a transition from draft to // draft means edit permission) instance.setWFState( WorkflowState.DRAFT.getEntity() ); callback.onSuccess( instance ); } } );
public static EIEntity getStateEntity(final EIURI stateUri) { if ( stateUri == null ) { return EIEntity.NULL_ENTITY; } for (WorkflowState state : values()) { if ( state.getUri().equals( stateUri ) ) { return state.getEntity(); } } return EIEntity.NULL_ENTITY; }