Package com.hellosign.sdk.resource
Class ApiApp
- java.lang.Object
-
- com.hellosign.sdk.resource.AbstractResource
-
- com.hellosign.sdk.resource.ApiApp
-
public class ApiApp extends AbstractResource
Contains information about an API App
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPIAPP_CALLBACK_URLstatic java.lang.StringAPIAPP_CLIENT_IDstatic java.lang.StringAPIAPP_CREATED_ATstatic java.lang.StringAPIAPP_CUSTOM_LOGOstatic java.lang.StringAPIAPP_DOMAINstatic java.lang.StringAPIAPP_IS_APPROVEDstatic java.lang.StringAPIAPP_KEYstatic java.lang.StringAPIAPP_NAMEstatic java.lang.StringAPIAPP_OWNER_ACCOUNT-
Fields inherited from class com.hellosign.sdk.resource.AbstractResource
dataObj, warnings
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddScope(ApiAppOauthScopeType scope)Add a scope to this API App's OAuth scope list.voidclearScopes()Clear all OAuth scopes for this API App.java.lang.StringgetCallbackUrl()The app's callback URL (for events).java.lang.StringgetClientId()The app's client ID.java.util.DategetCreatedAt()The time that the app was created.java.lang.StringgetDomain()The domain name associated with the app.java.lang.StringgetHeaderBackgroundColor()Get the signer page header background color.java.lang.StringgetLinkColor()Get the signer page link color.java.lang.StringgetName()The name of the app.ApiAppOauthgetOauthInfo()An object describing the app's OAuth properties.AccountgetOwnerAccount()An object describing the app's owner.java.lang.StringgetPageBackgroundColor()Get the signer page background color.java.util.Map<java.lang.String,java.io.Serializable>getPostFields()Internal method used to retrieve the necessary POST fields to submit the API app to HelloSign.java.lang.StringgetPrimaryButtonColor()Get the signer page primary button color.java.lang.StringgetPrimaryButtonHoverColor()Get the signer page primary button hover color.java.lang.StringgetPrimaryButtonTextColor()Get the signer page primary button text color.java.lang.StringgetPrimaryButtonTextHoverColor()Get the signer page primary button text hover color.java.lang.StringgetSecondaryButtonColor()Get the signer page secondary button color.java.lang.StringgetSecondaryButtonHoverColor()Get the signer page secondary button hover color.java.lang.StringgetSecondaryButtonTextColor()Get the signer page secondary button text color.java.lang.StringgetSecondaryButtonTextHoverColor()Get the signer page secondary button text hover color.java.lang.StringgetTextColor1()Get the signer page text 1 color.java.lang.StringgetTextColor2()Get the signer page text 2 color.WhiteLabelingOptionsgetWhiteLabelingOptions()Returns the current white labeling options for this API app.java.lang.BooleanhasCallbackUrl()True if the callback URL is non-null.booleanhasClientId()Returns true if this app has a client ID.java.lang.BooleanhasDomain()True if the domain has been set.java.lang.BooleanhasName()True if the name is set for this API App.java.lang.BooleanisApproved()Boolean to indicate if the app has been approved.voidremoveScope(ApiAppOauthScopeType scope)Remove the specified OAuth scope from this API App.voidsetCallbackUrl(java.lang.String url)Set the callback URL for this API app's events.voidsetCustomLogo(java.io.File f)Add a custom logo image to this API app.voidsetDomain(java.lang.String domain)Set this API app's domain.voidsetHeaderBackgroundColor(java.lang.String color)Set the signer page header background color.voidsetLinkColor(java.lang.String color)Set the signer page link color.voidsetName(java.lang.String name)Set this API app's name.voidsetOAuthCallbackUrl(java.lang.String url)voidsetPageBackgroundColor(java.lang.String color)Set the signer page background color.voidsetPrimaryButtonColor(java.lang.String color)Set the signer page primary button color.voidsetPrimaryButtonHoverColor(java.lang.String color)Set the signer page primary button hover color.voidsetPrimaryButtonTextColor(java.lang.String color)Set the signer page primary button text color.voidsetPrimaryButtonTextHoverColor(java.lang.String color)Set the signer page primary button text hover color.voidsetScopes(java.util.Set<ApiAppOauthScopeType> scopes)Set this API app's OAuth scopes.voidsetSecondaryButtonColor(java.lang.String color)Set the signer page secondary button color.voidsetSecondaryButtonHoverColor(java.lang.String color)Set the signer page secondary button hover color.voidsetSecondaryButtonTextColor(java.lang.String color)Set the signer page secondary button text color.voidsetSecondaryButtonTextHoverColor(java.lang.String color)Set the signer page secondary button text hover color.voidsetTextColor1(java.lang.String color)Set the signer page text 1 color.voidsetTextColor2(java.lang.String color)Set the signer page text 2 color.voidsetWhiteLabelingOptions(WhiteLabelingOptions options)Overrides all white labeling options for this API app.-
Methods inherited from class com.hellosign.sdk.resource.AbstractResource
add, addToList, clearList, get, getBoolean, getConstructor, getDate, getInteger, getJSONObject, getList, getList, getLong, getObject, getString, getWarnings, has, hasString, set, toString, toString
-
-
-
-
Field Detail
-
APIAPP_KEY
public static final java.lang.String APIAPP_KEY
- See Also:
- Constant Field Values
-
APIAPP_CALLBACK_URL
public static final java.lang.String APIAPP_CALLBACK_URL
- See Also:
- Constant Field Values
-
APIAPP_CLIENT_ID
public static final java.lang.String APIAPP_CLIENT_ID
- See Also:
- Constant Field Values
-
APIAPP_CREATED_AT
public static final java.lang.String APIAPP_CREATED_AT
- See Also:
- Constant Field Values
-
APIAPP_DOMAIN
public static final java.lang.String APIAPP_DOMAIN
- See Also:
- Constant Field Values
-
APIAPP_IS_APPROVED
public static final java.lang.String APIAPP_IS_APPROVED
- See Also:
- Constant Field Values
-
APIAPP_NAME
public static final java.lang.String APIAPP_NAME
- See Also:
- Constant Field Values
-
APIAPP_OWNER_ACCOUNT
public static final java.lang.String APIAPP_OWNER_ACCOUNT
- See Also:
- Constant Field Values
-
APIAPP_CUSTOM_LOGO
public static final java.lang.String APIAPP_CUSTOM_LOGO
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ApiApp
public ApiApp()
Default constructor.
-
ApiApp
public ApiApp(org.json.JSONObject json) throws HelloSignExceptionConstructor that instantiates an ApiApp object based on the JSON response from the HelloSign API.- Parameters:
json- JSONObject- Throws:
HelloSignException- thrown if there is a problem parsing the JSONObject
-
-
Method Detail
-
getCallbackUrl
public java.lang.String getCallbackUrl()
The app's callback URL (for events).- Returns:
- String callback URL or null
-
setCallbackUrl
public void setCallbackUrl(java.lang.String url)
Set the callback URL for this API app's events.- Parameters:
url- String
-
hasCallbackUrl
public java.lang.Boolean hasCallbackUrl()
True if the callback URL is non-null.- Returns:
- Boolean
-
getClientId
public java.lang.String getClientId()
The app's client ID.- Returns:
- String client ID
-
hasClientId
public boolean hasClientId()
Returns true if this app has a client ID.- Returns:
- boolean
-
getCreatedAt
public java.util.Date getCreatedAt()
The time that the app was created.- Returns:
- Date
-
getDomain
public java.lang.String getDomain()
The domain name associated with the app.- Returns:
- String domain name
-
setDomain
public void setDomain(java.lang.String domain)
Set this API app's domain.- Parameters:
domain- String
-
hasDomain
public java.lang.Boolean hasDomain()
True if the domain has been set.- Returns:
- Boolean
-
isApproved
public java.lang.Boolean isApproved()
Boolean to indicate if the app has been approved.- Returns:
- Boolean
-
getName
public java.lang.String getName()
The name of the app.- Returns:
- String name
-
setName
public void setName(java.lang.String name)
Set this API app's name.- Parameters:
name- String
-
hasName
public java.lang.Boolean hasName()
True if the name is set for this API App.- Returns:
- Boolean
-
getOauthInfo
public ApiAppOauth getOauthInfo()
An object describing the app's OAuth properties.- Returns:
- ApiAppOauth
-
setOAuthCallbackUrl
public void setOAuthCallbackUrl(java.lang.String url)
-
setScopes
public void setScopes(java.util.Set<ApiAppOauthScopeType> scopes)
Set this API app's OAuth scopes.- Parameters:
scopes- List of ApiAppOauthScopeType
-
addScope
public void addScope(ApiAppOauthScopeType scope)
Add a scope to this API App's OAuth scope list. Duplicates will be ignored.- Parameters:
scope- ApiAppOauthScopeType
-
clearScopes
public void clearScopes()
Clear all OAuth scopes for this API App.
-
removeScope
public void removeScope(ApiAppOauthScopeType scope)
Remove the specified OAuth scope from this API App.- Parameters:
scope- ApiAppOauthScopeType
-
getOwnerAccount
public Account getOwnerAccount()
An object describing the app's owner. NOTE: This Account object will only have the owner's account ID and email address. All other values will be null.- Returns:
- Account
-
setCustomLogo
public void setCustomLogo(java.io.File f)
Add a custom logo image to this API app.- Parameters:
f- File
-
getPostFields
public java.util.Map<java.lang.String,java.io.Serializable> getPostFields() throws HelloSignExceptionInternal method used to retrieve the necessary POST fields to submit the API app to HelloSign.- Returns:
- Map
- Throws:
HelloSignException- thrown if there is a problem serializing the POST fields.
-
getWhiteLabelingOptions
public WhiteLabelingOptions getWhiteLabelingOptions()
Returns the current white labeling options for this API app.- Returns:
- WhiteLabelingOptions
-
setWhiteLabelingOptions
public void setWhiteLabelingOptions(WhiteLabelingOptions options)
Overrides all white labeling options for this API app.- Parameters:
options- WhiteLabelingOptions
-
getPageBackgroundColor
public java.lang.String getPageBackgroundColor()
Get the signer page background color.- Returns:
- String hex color code
-
setPageBackgroundColor
public void setPageBackgroundColor(java.lang.String color) throws HelloSignExceptionSet the signer page background color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getHeaderBackgroundColor
public java.lang.String getHeaderBackgroundColor()
Get the signer page header background color.- Returns:
- String hex color code
-
setHeaderBackgroundColor
public void setHeaderBackgroundColor(java.lang.String color) throws HelloSignExceptionSet the signer page header background color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getTextColor1
public java.lang.String getTextColor1()
Get the signer page text 1 color.- Returns:
- String hex color code
-
setTextColor1
public void setTextColor1(java.lang.String color) throws HelloSignExceptionSet the signer page text 1 color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getTextColor2
public java.lang.String getTextColor2()
Get the signer page text 2 color.- Returns:
- String hex color code
-
setTextColor2
public void setTextColor2(java.lang.String color) throws HelloSignExceptionSet the signer page text 2 color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getLinkColor
public java.lang.String getLinkColor()
Get the signer page link color.- Returns:
- String hex color code
-
setLinkColor
public void setLinkColor(java.lang.String color) throws HelloSignExceptionSet the signer page link color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getPrimaryButtonColor
public java.lang.String getPrimaryButtonColor()
Get the signer page primary button color.- Returns:
- String hex color code
-
setPrimaryButtonColor
public void setPrimaryButtonColor(java.lang.String color) throws HelloSignExceptionSet the signer page primary button color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getPrimaryButtonTextColor
public java.lang.String getPrimaryButtonTextColor()
Get the signer page primary button text color.- Returns:
- String hex color code
-
setPrimaryButtonTextColor
public void setPrimaryButtonTextColor(java.lang.String color) throws HelloSignExceptionSet the signer page primary button text color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getPrimaryButtonHoverColor
public java.lang.String getPrimaryButtonHoverColor()
Get the signer page primary button hover color.- Returns:
- String hex color code
-
setPrimaryButtonHoverColor
public void setPrimaryButtonHoverColor(java.lang.String color) throws HelloSignExceptionSet the signer page primary button hover color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getPrimaryButtonTextHoverColor
public java.lang.String getPrimaryButtonTextHoverColor()
Get the signer page primary button text hover color.- Returns:
- String hex color code
-
setPrimaryButtonTextHoverColor
public void setPrimaryButtonTextHoverColor(java.lang.String color) throws HelloSignExceptionSet the signer page primary button text hover color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getSecondaryButtonColor
public java.lang.String getSecondaryButtonColor()
Get the signer page secondary button color.- Returns:
- String hex color code
-
setSecondaryButtonColor
public void setSecondaryButtonColor(java.lang.String color) throws HelloSignExceptionSet the signer page secondary button color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getSecondaryButtonTextColor
public java.lang.String getSecondaryButtonTextColor()
Get the signer page secondary button text color.- Returns:
- String hex color code
-
setSecondaryButtonTextColor
public void setSecondaryButtonTextColor(java.lang.String color) throws HelloSignExceptionSet the signer page secondary button text color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getSecondaryButtonHoverColor
public java.lang.String getSecondaryButtonHoverColor()
Get the signer page secondary button hover color.- Returns:
- String hex color code
-
setSecondaryButtonHoverColor
public void setSecondaryButtonHoverColor(java.lang.String color) throws HelloSignExceptionSet the signer page secondary button hover color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
getSecondaryButtonTextHoverColor
public java.lang.String getSecondaryButtonTextHoverColor()
Get the signer page secondary button text hover color.- Returns:
- String hex color code
-
setSecondaryButtonTextHoverColor
public void setSecondaryButtonTextHoverColor(java.lang.String color) throws HelloSignExceptionSet the signer page secondary button text hover color.- Parameters:
color- String hex color code- Throws:
HelloSignException- thrown if the color string is an invalid hex string
-
-