| Inherits from | |
|---|---|
| Declared in | NNTaggableObject.h |
Abstract class representing a taggable object (normally a file but can be anything really)
Tags must be loaded by subclass!
- tags
- setTags:
- retryCount
- incrementRetryCount
- setRetryCount:
- displayName
- setDisplayName:
- contentType
- setContentType:
- contentTypeIdentifier
- setContentTypeIdentifier:
- contentTypeTree
- setContentTypeTree:
- lastUsedDate
- setLastUsedDate:
- addTag:
- addTags:
- removeTag:
- removeTags:
- removeAllTags
- initiateSave
- handleFileManagement
- saveTags
- renameTo:errorWindow:
- moveToTrash:errorWindow:
- validateNewName:
- shouldManageFiles
- setShouldManageFiles:
- shouldManageFilesAutomatically
- setShouldManageFilesAutomatically:
- isWritable
+ (id)replaceMetadataValue:(id)attrValue forAttribute:(NSString *)attrName Value to replace
Name of the value's attribute
Replacement value, e.g. PDF for com.adobe.pdf
NNTaggableObject.h- (NSMutableSet *)tagsTags on this object
NNTaggableObject.h- (void)setTags:(NSMutableSet *)someTags should be used internally only (for example to implement copying), as it does not save the new tags to the backup storage
if you want to do that, please call initiateSave afterwards
NNTaggableObject.h- (NSInteger)retryCountCurrent retry count
NNTaggableObject.h- (void)incrementRetryCountIncrements the current retry count by 1.
NNTaggableObject.h- (void)setRetryCount:(NSInteger)i New retry count
NNTaggableObject.h- (NSString *)displayNameDisplay name (use this to show a representation of the object in your app)
NNTaggableObject.h- (void)setDisplayName:(NSString *)aDisplayName New display name
NNTaggableObject.h- (NSString *)contentTypeContent type of object
See the Spotlight constants for a meaning of this.
NNTaggableObject.h- (void)setContentType:(NSString *)aContentType New content type
NNTaggableObject.h- (NSString *)contentTypeIdentifierContent type identifier
See the Spotlight constants for a meaning of this.
NNTaggableObject.h- (void)setContentTypeIdentifier:(NSString *)aContentTypeIdentifier New content type identifier
NNTaggableObject.h- (NSArray *)contentTypeTreeContent type tree
See the Spotlight constants for a meaning of this.
NNTaggableObject.h- (void)setContentTypeTree:(NSArray *)aContentTypeTree New content type tree
NNTaggableObject.h- (NSDate *)lastUsedDateDate when this object was last used/opened
NNTaggableObject.h- (void)setLastUsedDate:(NSDate *)aDate New last used date
NNTaggableObject.h- (void)addTag:(NNTag *)tag Tag to add
Add a tag to the object - update will be saved to backing store.
NNTaggableObject.h- (void)addTags:(NSArray *)someTags Tags to add
Add multiple tags to object - update will be saved to backing store.
NNTaggableObject.h- (void)removeTag:(NNTag *)tag Tag to remove
Remove a tag from object - update will be saved to backing store.
NNTaggableObject.h- (void)removeTags:(NSArray *)someTags Tags to remove
Remove multiple tags from object - update will be saved to backing store.
NNTaggableObject.h- (void)removeAllTagsRemoves all tags from object - update will be saved to backing store.
NNTaggableObject.h- (void)initiateSaveCall this if you want to save to harddisk, don't call saveTags directly!
NNTaggableObject.h- (void)handleFileManagementWill be called when files are scheduled for file managing, abstract method does nothing, subclass may implement on demand
only called if pref is set.
NNTaggableObject.h- (BOOL)saveTagsSuccess or failure
Must be implemented by subclass, save tags to backing storage.
DO NOT CALL THIS DIRECTLY - use initiateSave instead, NNTagSave will take care of everything else.
NNTaggableObject.h- (void)renameTo:(NSString *)newName errorWindow:(NSWindow *)window New name for taggable object
Error window
Will be called on renaming, must be implemented in subclass.
NNTaggableObject.h- (void)moveToTrash:(BOOL)flag errorWindow:(NSWindow *)window YES trashes, NO does nothing
Error window
Will be called on moving to trash, must be implemented in subclass.
NNTaggableObject.h- (BOOL)validateNewName:(NSString *)newName Proposed name
YES if valid, else NO
Checks if new name for object is valid for example: NNFile needs to check if the filename is free in the directory
must be implemented by subclass!
NNTaggableObject.h- (BOOL)shouldManageFilesYES if files should be managed
NNTaggableObject.h- (void)setShouldManageFiles:(BOOL)flag Determines if files should be managed
NNTaggableObject.h- (BOOL)shouldManageFilesAutomaticallyYES if files are managed automatically
NNTaggableObject.h- (void)setShouldManageFilesAutomatically:(BOOL)flag Determines if files should be managed automatically
NNTaggableObject.h- (BOOL)isWritableYES if metadata can be written, NO otherwise
Call this to check if metadata can be written to the object
NNTaggableObject.hLast updated: 2010-5-13