Methods



booleanForProperty:

Abstract: Returns the boolean value for a property.
- (BOOL)booleanForProperty:(NSString *)property; 


content

Abstract: Obtain the content of the receiver.
- (NSString *)content; 


currentMood

Abstract: Obtain the mood associated with the receiver.
- (NSString *)currentMood; 

Result: The mood name, or nil if none is set.

currentMusic

Abstract: Obtain the music associated with the receiver.
- (NSString *)currentMusic; 


customInfo

Abstract: Returns a custom info dictionary for this entry.
- (NSMutableDictionary *)customInfo; 

Returns a mutable dictionary object you can use to store whatever information you would like to attach to this entry. All keys and values must support the NSCoding protocol.

This property is preserved during archiving.


init

Abstract: Initializes a new journal entry.
- (id)init; 

Initializes a new journal entry. The date is set to the current date and time. All other fields are left blank.


isEdited

Abstract: Obtain the edited status of this entry.
- (BOOL)isEdited; 

Returns YES if this entry has changed since it was last downloaded or saved, NO otherwise. The edited flag is set whenever any of the set... methods are called, and reset when saveToJournal completes successfully.


optionBackdated

Abstract: Obtain the backdated setting of the receiver.
- (BOOL)optionBackdated; 


optionNoComments

Abstract: Obtain the don't allow comments setting of the receiver.
- (BOOL)optionNoComments; 


optionNoEmail

Abstract: Obtain the don't email comments setting of the receiver.
- (BOOL)optionNoEmail; 


optionPreformatted

Abstract: Obtain the preformatted setting of the receiver.
- (BOOL)optionPreformatted; 


pictureKeyword

Abstract: Obtain the picture keyword associated with the receiver.
- (NSString *)pictureKeyword; 


saveToJournal

Abstract: Saves the receiver's data on the server.
- (void)saveToJournal; 

If the receiver is unassociated, raises an exception. If the receiver is associated with a journal, sends a postevent message to the server and sets the itemID of the receiver, making is a posted entry. If the receiver is posted, sends an editevent message to the server.


setAccessAllowed:forGroup:

Abstract: Allow or deny access for a specific group.
- (void)setAccessAllowed:(BOOL)allowed forGroup:(LJGroup *)group; 

Set whether a group is allowed to access this journal if the security mode is set to LJGroupSecurityMode. If the security mode is something else, an exception is raised.

You cannot use this and other group security related methods on unassociated entries. If you try, an exception will be raised. This is because groups have no meaning outside of their account, and unassociated entries are not attached to an account.


setBoolean:forProperty:

Abstract: Set the boolean value of a metadata property.
- (void)setBoolean:(BOOL)flag forProperty:(NSString *)property; 


setContent:

Abstract: Set the content of the receiver.
- (void)setContent:(NSString *)content; 


setCurrentMood:

Abstract: Set the mood associated with the receiver.
- (void)setCurrentMood:(NSString *)moodName; 

Sets the current mood for this entry. Set moodName to nil to remove the mood property. If the mood has an associated ID number, it will be set by the LJKit in [LJEntry saveToJournal]; this allows LiveJournal to display the graphic for that mood on the web.


setCurrentMusic:

Abstract: Sets the music associated with the receiver.
- (void)setCurrentMusic:(NSString *)music; 


setDate:

Abstract: Set the date of the receiver.
- (void)setDate:(NSDate *)date; 

Sets the date of the receiver. Note that if you want to post an entry with a date earlier than the latest entry already in the journal the server will return an error asking you to set the backdate option on this entry. See setOptionBackdated:.


setEdited:

Abstract: Sets the edited status of this entry.
- (void)setEdited:(BOOL)flag; 

You can call this method to mark this entry as edited or unedited as you see fit.


setGroupsAllowedAccessMask:

- (void)setGroupsAllowedAccessMask:(unsigned int)mask; 

Set the bitmask which defines the groups allowed to access this entry. This value is ignored if not in LJGroupSecurityMode.


setJournal:

Abstract: Set the journal to associate the receiver with.
- (void)setJournal:(LJJournal *)journal; 

Sets the journal this entry is associated with. To cause the receiver to become unassociated, call set journal to nil. An exception is raised if you attempt to change the journal of a posted entry.

If through this method you cause the receiver to become associated with an different account than before, and the security mode is LJGroupModeSecurity, the set of allowed groups will be cleared, as groups have no meaning outside of the account they exist in.


setOptionBackdated:

Abstract: Sets the backdated setting of the receiver.
- (void)setOptionBackdated:(BOOL)flag; 

If an entry is backdated, it will not appear on other users' friends views. You must backdate an entry if it bears a date earlier than the latest entry posted to the journal.


setOptionNoEmail

Abstract: Sets the don't email comments setting of the receiver.
- (void)setOptionNoEmail:(BOOL)flag; 

LiveJournal provides to option to email a copy of comments that are posted to your journal. This method allows you to override this option for this one entry.


setOptionPreformatted:

Abstract: Set the preformatted setting of the receiver.
- (void)setOptionPreformatted:(BOOL)flag; 

If this option is enabled, LiveJournal will not apply the usually formatting, such as changing newlines to <br> tags. Enable this option if you want to control the receivers appearance with HTML tags. You may still include HTML in your entry if this option is disabled.


setOptionsNoComments:

Abstract: Set the don't allow comments setting of the receiver.
- (void)setOptionNoComments:(BOOL)flag; 

If you don't want to allow users to write comments about the receiver, set this to true.


setPictureKeyword:

Abstract: Set the picture keyword associated with the receiver.
- (void)setPictureKeyword:(NSString *)keyword; 

The set of available picture keywords can be obtained from the [LJAccount userPicturesDictionary] method, using the keys from the resulting NSDictionary.


setSecurityMode:

Abstract: Set the security mode of the receiver.
- (void)setSecurityMode:(int)security; 

The security modes are explained in the LJEntry Security Modes enumeration.

You cannot set the security mode to LJGroupSecurityMode unless the receiver has been associated with a journal. This is because groups only have meaning in the context of a particular account, and an unassociated entry has no connection to an account object.


setString:forProperty:

Abstract: Set the string value of a metadata property.
- (void)setString:(NSString *)string forProperty:(NSString *)property; 

Sets the string value of a metadata property. To remove a property, set its value to nil.


setSubject:

Abstract: Set the subject of the receiver.
- (void)setSubject:(NSString *)subject; 


stringForProperty:

Abstract: Obtain the string value of a metadata property.
- (NSString *)stringForProperty:(NSString *)property; 

Result: The string value of a metadata property, or nil if it has no value.

subject

Abstract: Obtain the subject of the receiver.
- (NSString *)subject; 


(Last Updated 2/17/2003)