org.shredzone.flattr4j.model
Class AutoSubmission

java.lang.Object
  extended by org.shredzone.flattr4j.model.Submission
      extended by org.shredzone.flattr4j.model.AutoSubmission
All Implemented Interfaces:
Serializable, UserId, UserIdentifier

public class AutoSubmission
extends Submission
implements UserId, UserIdentifier

An AutoSubmission is used to generate a URL for auto submission. A user must be set, which will be the owner of the Thing.

Since:
2.0
Author:
Richard "Shred" Körber
See Also:
Serialized Form

Constructor Summary
AutoSubmission()
           
 
Method Summary
 UserIdentifier getIdentifier()
          The user identifier of the local user This is only available for Partner Site Integration.
 UserId getUser()
          The user to submit this Submission on behalf of.
 String getUserId()
          Returns the User's ID.
 String getUserIdentifier()
          User identifier string.
 void setIdentifier(UserIdentifier identifier)
           
 void setUser(UserId user)
           
 String toUrl()
          Returns a URL that can be used for submitting a Thing (for example in a link).
 
Methods inherited from class org.shredzone.flattr4j.model.Submission
addTag, getCategory, getDescription, getLanguage, getTags, getTagsAsString, getTitle, getUrl, isHidden, setCategory, setDescription, setHidden, setLanguage, setTags, setTitle, setUrl, toFlattrObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoSubmission

public AutoSubmission()
Method Detail

getUser

public UserId getUser()
The user to submit this Submission on behalf of.


setUser

public void setUser(UserId user)

getUserId

public String getUserId()
Description copied from interface: UserId
Returns the User's ID.

Specified by:
getUserId in interface UserId
Returns:
User id

getIdentifier

public UserIdentifier getIdentifier()
The user identifier of the local user

This is only available for Partner Site Integration. You need to register your site with Flattr in order to use user identifiers.


setIdentifier

public void setIdentifier(UserIdentifier identifier)

getUserIdentifier

public String getUserIdentifier()
Description copied from interface: UserIdentifier
User identifier string.

Examples:

Specified by:
getUserIdentifier in interface UserIdentifier

toUrl

public String toUrl()
Returns a URL that can be used for submitting a Thing (for example in a link).

Use this URL as a fallback only if you can't use FlattrService.create(Submission) or JavaScript. The length of an URL is limited and depends on the browser and the server. The submission will be truncated if the maximum length was exceeded.

Returns:
Submission URL


Copyright © 2010-2012. All Rights Reserved.