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.String
APIAPP_CALLBACK_URL
static java.lang.String
APIAPP_CLIENT_ID
static java.lang.String
APIAPP_CREATED_AT
static java.lang.String
APIAPP_CUSTOM_LOGO
static java.lang.String
APIAPP_DOMAIN
static java.lang.String
APIAPP_IS_APPROVED
static java.lang.String
APIAPP_KEY
static java.lang.String
APIAPP_NAME
static java.lang.String
APIAPP_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 void
addScope(ApiAppOauthScopeType scope)
Add a scope to this API App's OAuth scope list.void
clearScopes()
Clear all OAuth scopes for this API App.java.lang.String
getCallbackUrl()
The app's callback URL (for events).java.lang.String
getClientId()
The app's client ID.java.util.Date
getCreatedAt()
The time that the app was created.java.lang.String
getDomain()
The domain name associated with the app.java.lang.String
getHeaderBackgroundColor()
Get the signer page header background color.java.lang.String
getLinkColor()
Get the signer page link color.java.lang.String
getName()
The name of the app.ApiAppOauth
getOauthInfo()
An object describing the app's OAuth properties.Account
getOwnerAccount()
An object describing the app's owner.java.lang.String
getPageBackgroundColor()
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.String
getPrimaryButtonColor()
Get the signer page primary button color.java.lang.String
getPrimaryButtonHoverColor()
Get the signer page primary button hover color.java.lang.String
getPrimaryButtonTextColor()
Get the signer page primary button text color.java.lang.String
getPrimaryButtonTextHoverColor()
Get the signer page primary button text hover color.java.lang.String
getSecondaryButtonColor()
Get the signer page secondary button color.java.lang.String
getSecondaryButtonHoverColor()
Get the signer page secondary button hover color.java.lang.String
getSecondaryButtonTextColor()
Get the signer page secondary button text color.java.lang.String
getSecondaryButtonTextHoverColor()
Get the signer page secondary button text hover color.java.lang.String
getTextColor1()
Get the signer page text 1 color.java.lang.String
getTextColor2()
Get the signer page text 2 color.WhiteLabelingOptions
getWhiteLabelingOptions()
Returns the current white labeling options for this API app.java.lang.Boolean
hasCallbackUrl()
True if the callback URL is non-null.boolean
hasClientId()
Returns true if this app has a client ID.java.lang.Boolean
hasDomain()
True if the domain has been set.java.lang.Boolean
hasName()
True if the name is set for this API App.java.lang.Boolean
isApproved()
Boolean to indicate if the app has been approved.void
removeScope(ApiAppOauthScopeType scope)
Remove the specified OAuth scope from this API App.void
setCallbackUrl(java.lang.String url)
Set the callback URL for this API app's events.void
setCustomLogo(java.io.File f)
Add a custom logo image to this API app.void
setDomain(java.lang.String domain)
Set this API app's domain.void
setHeaderBackgroundColor(java.lang.String color)
Set the signer page header background color.void
setLinkColor(java.lang.String color)
Set the signer page link color.void
setName(java.lang.String name)
Set this API app's name.void
setOAuthCallbackUrl(java.lang.String url)
void
setPageBackgroundColor(java.lang.String color)
Set the signer page background color.void
setPrimaryButtonColor(java.lang.String color)
Set the signer page primary button color.void
setPrimaryButtonHoverColor(java.lang.String color)
Set the signer page primary button hover color.void
setPrimaryButtonTextColor(java.lang.String color)
Set the signer page primary button text color.void
setPrimaryButtonTextHoverColor(java.lang.String color)
Set the signer page primary button text hover color.void
setScopes(java.util.Set<ApiAppOauthScopeType> scopes)
Set this API app's OAuth scopes.void
setSecondaryButtonColor(java.lang.String color)
Set the signer page secondary button color.void
setSecondaryButtonHoverColor(java.lang.String color)
Set the signer page secondary button hover color.void
setSecondaryButtonTextColor(java.lang.String color)
Set the signer page secondary button text color.void
setSecondaryButtonTextHoverColor(java.lang.String color)
Set the signer page secondary button text hover color.void
setTextColor1(java.lang.String color)
Set the signer page text 1 color.void
setTextColor2(java.lang.String color)
Set the signer page text 2 color.void
setWhiteLabelingOptions(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 HelloSignException
Constructor 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 HelloSignException
Internal 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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 HelloSignException
Set 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
-
-