クラス WebApiDefinition

java.lang.Object
org.iplass.mtp.webapi.definition.WebApiDefinition
すべての実装されたインタフェース:
Serializable, Definition

public class WebApiDefinition extends Object implements Definition
関連項目:
  • コンストラクタの詳細

    • WebApiDefinition

      public WebApiDefinition()
  • メソッドの詳細

    • getMaxFileSize

      public Long getMaxFileSize()
    • setMaxFileSize

      public void setMaxFileSize(Long maxFileSize)
      multipart/form-data時のアップロードファイルの最大サイズ。-1の場合は無制限。 1つのファイルに対する最大サイズなので、複数のファイルの合計サイズを制限したい場合は、 maxRequestBodySizeを設定します。
      パラメータ:
      maxFileSize -
    • getMaxRequestBodySize

      public Long getMaxRequestBodySize()
    • setMaxRequestBodySize

      public void setMaxRequestBodySize(Long maxRequestBodySize)
      リクエストボディの最大サイズ。-1の場合は無制限。
      パラメータ:
      maxRequestBodySize -
    • getAllowRequestContentTypes

      public String[] getAllowRequestContentTypes()
    • setAllowRequestContentTypes

      public void setAllowRequestContentTypes(String[] allowRequestContentTypes)
      許可するリクエストボディのContentTypeを指定。未指定の場合はすべて許可。
      accepts指定より、allowRequestContentTypesの指定による制限が優先されます。
      例えば、 accepts指定によりJSON形式の処理が有効化されている場合において、 allowRequestContentTypesに"application/json"が含まれない場合は、 JSON形式によるリクエストは処理されません。
      パラメータ:
      allowRequestContentTypes -
    • getOauthScopes

      public String[] getOauthScopes()
    • setOauthScopes

      public void setOauthScopes(String[] oauthScopes)
    • isSupportBearerToken

      public boolean isSupportBearerToken()
    • setSupportBearerToken

      public void setSupportBearerToken(boolean supportBearerToken)
    • getState

      public StateType getState()
    • setState

      public void setState(StateType state)
      WebApiをStatelessとして呼び出すか否かを設定します。 デフォルトは、StateType.STATEFULです。
      パラメータ:
      state -
    • isNeedTrustedAuthenticate

      public boolean isNeedTrustedAuthenticate()
    • setNeedTrustedAuthenticate

      public void setNeedTrustedAuthenticate(boolean needTrustedAuthenticate)
    • getAccessControlAllowOrigin

      public String getAccessControlAllowOrigin()
    • setAccessControlAllowOrigin

      public void setAccessControlAllowOrigin(String accessControlAllowOrigin)
    • isAccessControlAllowCredentials

      public boolean isAccessControlAllowCredentials()
    • setAccessControlAllowCredentials

      public void setAccessControlAllowCredentials(boolean accessControlAllowCredentials)
    • getResponseType

      public String getResponseType()
    • setResponseType

      public void setResponseType(String responseType)
    • isSynchronizeOnSession

      public boolean isSynchronizeOnSession()
    • setSynchronizeOnSession

      public void setSynchronizeOnSession(boolean synchronizeOnSession)
    • getTokenCheck

      public WebApiTokenCheck getTokenCheck()
    • setTokenCheck

      public void setTokenCheck(WebApiTokenCheck tokenCheck)
    • getRestJsonParameterType

      public String getRestJsonParameterType()
    • setRestJsonParameterType

      public void setRestJsonParameterType(String restJsonParameterType)
    • getRestJsonParameterName

      public String getRestJsonParameterName()
    • setRestJsonParameterName

      public void setRestJsonParameterName(String restJsonParameterName)
    • getRestJsonAcceptableContentTypes

      public String[] getRestJsonAcceptableContentTypes()
      REST JSON として受付可能な Content-Type を取得します。
      戻り値:
      Content-Type 配列
    • setRestJsonAcceptableContentTypes

      public void setRestJsonAcceptableContentTypes(String[] acceptableContentTypes)
      REST JSON として受付可能な Content-Type を設定します。
      パラメータ:
      acceptableContentTypes - Content-Type 配列
    • getRestXmlParameterName

      public String getRestXmlParameterName()
    • setRestXmlParameterName

      public void setRestXmlParameterName(String restXmlParameterName)
    • getRestXmlParameterType

      public String getRestXmlParameterType()
    • setRestXmlParameterType

      public void setRestXmlParameterType(String restXmlParameterType)
    • getRestXmlAcceptableContentTypes

      public String[] getRestXmlAcceptableContentTypes()
      REST XML として受付可能な Content-Type を取得します。
      戻り値:
      Content-Type 配列
    • setRestXmlAcceptableContentTypes

      public void setRestXmlAcceptableContentTypes(String[] acceptableContentTypes)
      REST XML として受付可能な Content-Type を設定します。
      パラメータ:
      acceptableContentTypes - Content-Type 配列
    • getAccepts

      public RequestType[] getAccepts()
    • setAccepts

      public void setAccepts(RequestType[] accepts)
    • getMethods

      public MethodType[] getMethods()
    • setMethods

      public void setMethods(MethodType[] methods)
    • getName

      public String getName()
      インタフェースからコピーされた説明: Definition
      名前を取得します。
      定義:
      getName インタフェース内 Definition
      戻り値:
      name
    • setName

      public void setName(String name)
      インタフェースからコピーされた説明: Definition
      名前を設定します。
      定義:
      setName インタフェース内 Definition
      パラメータ:
      name - セットする name
    • getDisplayName

      public String getDisplayName()
      インタフェースからコピーされた説明: Definition
      表示名を取得します。
      定義:
      getDisplayName インタフェース内 Definition
      戻り値:
      displayName
    • setDisplayName

      public void setDisplayName(String displayName)
      インタフェースからコピーされた説明: Definition
      表示名を設定します。
      定義:
      setDisplayName インタフェース内 Definition
      パラメータ:
      displayName - セットする displayName
    • getDescription

      public String getDescription()
      インタフェースからコピーされた説明: Definition
      概要を取得します。
      定義:
      getDescription インタフェース内 Definition
      戻り値:
      description
    • setDescription

      public void setDescription(String description)
      インタフェースからコピーされた説明: Definition
      概要を設定します。
      定義:
      setDescription インタフェース内 Definition
      パラメータ:
      description - セットする description
    • getCacheControlType

      public CacheControlType getCacheControlType()
      戻り値:
      cacheControlType
      関連項目:
    • setCacheControlType

      public void setCacheControlType(CacheControlType cacheControlType)
      WebAPIキャッシュ指定(Cache-Controlヘッダの制御)。 未指定の場合はキャッシュをしない。 ブラウザ種別によらず、キャッシュを有効化するためには、合わせてCacheControlMaxAgeの設定も必要。
      パラメータ:
      cacheControlType -
      関連項目:
    • getCacheControlMaxAge

      public long getCacheControlMaxAge()
      戻り値:
      関連項目:
    • setCacheControlMaxAge

      public void setCacheControlMaxAge(long cacheControlMaxAge)
      cacheControlMaxAge=CacheControlType.CACHEを指定した場合の WebAPIキャッシュのmax-age(秒)を指定。 デフォルト値は-1でこの場合はmax-ageは未指定となる。
      注意:max-age未指定の場合、FF、Chromeでは実際はキャッシュが利用されない
      パラメータ:
      cacheControlMaxAge -
    • getCommandConfig

      public CommandConfig getCommandConfig()
      戻り値:
      commandConfig
    • setCommandConfig

      public void setCommandConfig(CommandConfig commandConfig)
      パラメータ:
      commandConfig - セットする commandConfig
    • getWebApiParamMap

      public WebApiParamMapDefinition[] getWebApiParamMap()
      戻り値:
      paramMap
    • setWebApiParamMap

      public void setWebApiParamMap(WebApiParamMapDefinition[] webApiParamMap)
      パラメータ:
      webApiParamMap - セットする webApiParamMap
    • getResults

      @Deprecated public String[] getResults()
      推奨されていません。
      getResponseResults() を使用してください。本メソッドは大きなバージョンアップで削除する予定です。
      戻り値:
      result
    • setResults

      @Deprecated public void setResults(String[] results)
      推奨されていません。
      setResponseResults(WebApiResultAttribute[]) を使用してください。本メソッドは大きなバージョンアップで削除する予定です。
      パラメータ:
      result - セットする result
    • getResponseResults

      public WebApiResultAttribute[] getResponseResults()
      WebApiレスポンスの結果の属性を取得します。
      戻り値:
      WebApiレスポンスの結果の属性
    • setResponseResults

      public void setResponseResults(WebApiResultAttribute[] responseResults)
      WebApiレスポンスの結果の属性を設定します。
      パラメータ:
      responseResults - WebApiレスポンスの結果の属性
    • isPublicWebApi

      public boolean isPublicWebApi()
    • setPublicWebApi

      public void setPublicWebApi(boolean isPublicWebApi)
      このWebApiの呼び出しをセキュリティ設定によらず呼び出し可能にする場合は、trueを設定します。 isPrivilegedとの違いは、Entityの操作などにおいては、セキュリティ制約を受けます。 デフォルトはfalseです。
      パラメータ:
      isPublicWebApi -
    • isPrivilaged

      @Deprecated public boolean isPrivilaged()
      推奨されていません。
      isPrivileged() を使用してください。
      戻り値:
    • setPrivilaged

      @Deprecated public void setPrivilaged(boolean isPrivileged)
      推奨されていません。
      setPrivileged(boolean) を使用してください。
      パラメータ:
      isPrivileged -
    • isPrivileged

      public boolean isPrivileged()
      戻り値:
    • setPrivileged

      public void setPrivileged(boolean isPrivileged)
      パラメータ:
      isPrivileged -
    • isCheckXRequestedWithHeader

      public boolean isCheckXRequestedWithHeader()
      XMLHttpRequestがセットされていることを確認するかを取得します。
      戻り値:
      XMLHttpRequestチェック可否
    • setCheckXRequestedWithHeader

      public void setCheckXRequestedWithHeader(boolean isCheckXRequestedWithHeader)
      XMLHttpRequestチェック可否を設定します。
      パラメータ:
      isCheckXRequestedWithHeader -
    • isReturnStubResponse

      public boolean isReturnStubResponse()
      スタブレスポンスを返却するかを取得します。
      戻り値:
      スタブレスポンスを返却する場合は true を返却
    • setReturnStubResponse

      public void setReturnStubResponse(boolean returnStubResponse)
      スタブレスポンスを返却するかを設定します。
      パラメータ:
      returnStubResponse - スタブレスポンスを返却する場合は true を設定
    • getStubDefaultContent

      public String getStubDefaultContent()
      スタブデフォルトコンテンツを取得します。

      getStubContents() に対応するコンテンツが設定されていない場合のデフォルト返却値です。

      戻り値:
      スタブデフォルトコンテンツ
    • setStubDefaultContent

      public void setStubDefaultContent(String stubDefaultConetnt)
      スタブデフォルトコンテンツを設定します。

      getStubContents() に対応するコンテンツが設定されていない場合のデフォルト返却値です。

      パラメータ:
      stubDefaultConetnt - スタブデフォルトコンテンツ
    • getStubContents

      public WebApiStubContent[] getStubContents()
      スタブコンテンツを取得します。
      戻り値:
      スタブコンテンツ配列
    • setStubContents

      public void setStubContents(WebApiStubContent[] stubContents)
      スタブコンテンツを設定します。
      パラメータ:
      stubContents - スタブコンテンツ配列
    • getOpenApiVersion

      public String getOpenApiVersion()
      OpenAPIのバージョンを取得します。
      戻り値:
      OpenAPIのバージョン
    • setOpenApiVersion

      public void setOpenApiVersion(String openApiVersion)
      OpenAPIのバージョンを設定します。

      3.0, 3.1 などマイナーバージョンまで記載します。 OpenAPI バージョンに記載できる内容は OpenApiVersion を参照してください。

      パラメータ:
      openApiVersion - OpenAPIのバージョン
    • getOpenApiFileType

      public String getOpenApiFileType()
      OpenAPIのファイルタイプを取得します。
      戻り値:
      OpenAPIのファイルタイプ
    • setOpenApiFileType

      public void setOpenApiFileType(String openApiFileType)
      OpenAPIのファイルタイプを設定します。

      OpenAPI のフォーマットは、JSON または YAML です。 設定できる内容は、 OpenApiFileType を参照してください。

      パラメータ:
      openApiFileType - OpenAPIのファイルタイプ
    • getOpenApi

      public String getOpenApi()
      OpenAPI定義を取得します。
      戻り値:
      OpenAPI定義
    • setOpenApi

      public void setOpenApi(String openApi)
      OpenAPI定義を設定します。
      パラメータ:
      openApi - OpenAPI定義