Methods



accessAllowedForGroup:

Abstract: Determine whether access is allowed for a specific group.
- (BOOL)accessAllowedForGroup:(LJGroup *)group; 

Returns YES if the members of the given group are allowed to read the receiver, NO otherwise. This method returns a correct response regardless of the receiver's security mode.

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.


date

Abstract: Obtain the date of the receiver.
- (NSDate *)date; 


groupsAllowdAccessMask

- (unsigned int)groupsAllowedAccessMask; 

Returns the bitmask which defines the groups allowed to access the receiver. If the security mode is not LJGroupSecurityMode, this value will make no sense.


groupsAllowedAccessArray

Abstract: Determine what groups are allowed access to the receiver.
- (NSArray *)groupsAllowedAccessArray; 

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.

Result: An NSArray of LJGroup objects.

groupsAllowedAccessSet

Abstract: Determine what groups are allowed access to the receiver.
- (NSSet *)groupsAllowedAccessSet; 

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.

Result: An NSSet of LJGroup objects.

initWithContentsOfFile:

Abstract: Initializes an entry object from a file.
- (id)initWithContentsOfFile:(NSString *)path; 

Loads an entry from an archived file. This method uses NSKeyedUnarchiver to read the archive from disk.

Parameters

NameDescription
Thefile to read from.

itemID

Abstract: Obtain the itemID of the receiver.
- (int)itemID; 

If the entry is posted, returns its itemID as reported by the server. If the entry is only associated or unassociated, returns 0.


journal

Abstract: Obtain the journal associated with the receiver.
- (LJJournal *)journal; 

Returns the journal that the receiver is associated with, or nil if it is unassociated.


postCommentsHttpURL

Abstract: Returns the URL of the receiver's post comments view.
- (NSURL *)postCommentHttpURL; 


posterUsername

Abstract: Obtain the username of the entry's poster.
- (NSString *)posterUsername; 

Returns the username of the user that posted this entry, according to the LiveJournal server. You should assume that the receiver was posted by the currently logged in user if this method returns nil.


readCommentsHttpURL

Abstract: Returns the URL of the receiver's read comments view.
- (NSURL *)readCommentsHttpURL; 


removeFromJournal

Abstract: Removes the receiver from the server.
- (void)removeFromJournal; 

If the receiver is a posted entry, sends an editevent message to the server so that the entry is deleted. The receiver becomes associated with the same journal but no longer posted. If this method is called on an associated or unassociated entry an exception is raised. This method marks the receiver as edited.


securityMode

Abstract: Obtain the security mode of the receiver.
- (int)securityMode; 

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


writeToFile:

Abstract: Writes an entry to disk.
- (BOOL)writeToFile:(NSString *)path; 

Saves an entry to disk. Uses NSKeyedArchiver to archive the object.

Parameters

NameDescription
pathThe file to write to.
Result: YES on success; NO otherwise.

(Last Updated 2/17/2003)