Sha256: 7dfcd2bf1fdcdce0251967c446b32a45c867ef24e97ce90b7e05795346951d73
Contents?: true
Size: 1.58 KB
Versions: 3
Compression:
Stored size: 1.58 KB
Contents
(* * @param input.tag: t_Owner: of the new tag. * * Notice: owner name invalid if 'Nil' * owner address invalid if any fields 'Nil' *) procedure s_post_tag( input ) { post_tag_start: {{^PREFERENCES.debug-output}}\* {{/PREFERENCES.debug-output}} print <<"Tag post, input=", input >>; (* Validata input *) if ( ~ValidateTagData( input.tag ) ) { pet_application_error( "tag data not valid" ); return; }; post_tag_validated_input: (* Owner invalidation now allowed if Owner has already been validated *) if ( TagOwnerValidated( input.tag ) /\ ~ValidOwner( input.tag ) ) { {{^PREFERENCES.debug-output}}\* {{/PREFERENCES.debug-output}} print <<"Tag post, existing owners=", FindTagsByOwnerName( input.tag ) >>; pet_application_error( "Owner invalidation not allowed" ); return; }; post_tag_data_validated: (* Generate id using infrastructure service /id/{type}(get) *) call infrastructure_id_get( "tag" ); post_tag_id_generated: (* Id generation failure? *) if ( InfrastructureServiceGetStatus( "/id/{type}(get)" ) # "status_200" ) { {{^PREFERENCES.debug-output}}\* {{/PREFERENCES.debug-output}} print <<"Tag post, v_ids=", v_ids >>; pet_application_error( "no id " ); return; }; post_tag_ok: (* All checks passed: enter into database *) enter_tag( New_Tag( input.tag, InfrastructureServiceGetResponse( "/id/{type}(get)" ).status_200.id ) ); post_tag_done: return; }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tla-sbuilder-0.3.9 | src/pet/service_tag_post.tla |
tla-sbuilder-0.3.8 | src/pet/service_tag_post.tla |
tla-sbuilder-0.3.7 | src/pet/service_tag_post.tla |