public Optional < ProjectHook > getOptionalHook ( Object projectIdOrPath , Integer hookId ) { try { return ( Optional . ofNullable ( getHook ( projectIdOrPath , hookId ) ) ) ; } catch ( GitLabApiException glae ) { return ( GitLabApi . createOptionalFromException ( glae ) ) ; } }
Get a specific hook for project as an Optional instance .