public class Format extends TieSystemObject
You should specify a document's format whenever you create a document with content. Two collections of formats can be retrieved from the current LibrarySession. The collections contain the same formats; one allows a lookup by format name, and the other by format file extension (for example, "html").
Note that you need to have admin privileges to create or modify document formats.
Document| Modifier and Type | Field and Description |
|---|---|
static String |
BINARY_ATTRIBUTE
An indicator of whether this Format is textual or binary.
|
static String |
CLASS_NAME
This class name for this class.
|
static String |
DEFAULT_FORMAT_NAME
Name of the default format that is used when the extension
is not known.
|
static String |
EXTENSION_ATTRIBUTE
A three letter file extension associated with this Format (e.g. txt).
|
static String |
INDEXED_ATTRIBUTE
Whether content is full-text indexed.
|
static String |
MIMETYPE_ATTRIBUTE
The MIME type of this Format (e.g. text/html).
|
static String |
NAME_ATTRIBUTE
The name of this Format (e.g.
|
ACTIVE_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, POLICYLISTS_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTEDOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session| Modifier | Constructor and Description |
|---|---|
protected |
Format(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Construct a Format object - standard variant.
|
| Modifier and Type | Method and Description |
|---|---|
protected static Format |
constructFormat(LibrarySession sess,
S_LibraryObjectData data)
constructFormat - FixmeJavadocMethod
|
protected static Vector |
constructFormatVector(LibrarySession sess,
Vector vector)
constructFormatVector - FixmeJavadocMethod
|
static Format[] |
findAll(LibrarySession session)
Returns the set of defined Formats.
|
static Format |
findByExtension(LibrarySession session,
String extension)
Returns the a Format matching the specified extension.
|
static Format |
findByName(LibrarySession session,
String name)
Returns the a Format matching the specified name.
|
static Long |
getClassId(LibrarySession session)
Get the ID of the ClassObject representing FORMAT.
|
static Format |
getDefaultFormat(LibrarySession session)
Gets the "default" format, to be used when no existing
format matches identification criteria (e.g. file extension
or mime type).
|
String |
getExtension()
returns the local file extension associated with this Format.
|
static Format |
getFormatByFilename(LibrarySession session,
String filename)
Derives a format based on the extension of the given filename.
|
static LibraryObjectLookupCache |
getLibraryObjectLookupCache(LibrarySessionInterface session)
Returns the LibraryObjectLookupCache used by find
Format instances by name.
|
static LibraryObjectLookupCache |
getLibraryObjectLookupCacheByExtension(LibrarySessionInterface session)
Returns the LibraryObjectLookupCache used by find
Format instances by EXTENSION.
|
String |
getMimeType()
returns the MIME type of this Format
|
boolean |
hasNameAttribute()
Override to return true for any PublicObject, indicating
that the instance has a NAME attribute.
|
boolean |
isBinary()
returns true if this format describes binary content, false if text.
|
boolean |
isIndexed()
Gets whether content is indexed.
|
void |
setBinary(boolean isBinary)
Marks this format as either binary (true) or text (false)
|
void |
setExtension(String FileExtension)
Associates a local file extension with this Format.
|
void |
setMimeType(String mimeType)
Associates MIME type with this Format.
|
protected static Format |
vectorFormatElement(Vector vector,
int index)
Returns a Format from a vector of Formats
|
protected static Format[] |
vectorToFormatArray(Vector vector)
Constructs an array of Format's from a vector of Formats
|
addCategory, constructSystemObject, constructSystemObjectVector, free, freeCategories, getCategories, getCategories, getCategories, getCategories, getPolicyBundle, getPolicyLists, handleCreate, hasPropertyBundleAttribute, isActive, postCreate, postUpdate, preCreate, preUpdate, putPolicy, removeAllPolicies, removePolicy, removePolicy, setActive, setPolicyBundle, setPolicyListsadded, addSimpleProperty, addSimpleProperty, applyProperties, auditCreated, auditUpdated, canPurge, checkIfPropertyBundleSupported, checkRequiredAttributeSet, clearCopyContext, clearFreeContext, clearUpdateContext, compareTo, constructIdArray, constructIdArray, constructLibraryObject, constructLibraryObjectVector, createDedicatedPropertyBundle, createInstance, deriveDomainUniqueName, dispose, equals, equals, free, freeAll, get, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getAuditDomainContext, getAuditEventFolderContext, getClassId, getClassname, getClassName, getClassObject, getCommonName, getCommonNameAndClass, getCopyContext, getCreateContext, getData, getDefinition, getDefinitionForSimplePropertyUpdates, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getFreeContext, getId, getLabel, getName, getObjectReferenceAttribute, getOperationActionSpecificationContext, getPropertyBundle, getPropertyValue, getPublicObjectAttribute, getResourceString, getResourceString, getSchemaObjectAttribute, getSession, getSessionInterface, getSharedStateFactory, getSimpleObjectAttribute, getSimpleProperties, getSimpleProperty, getSimplePropertyValue, getStringIdentifier, getSystemObjectAttribute, getTraceLogger, getUpdateContext, handleAdminModeChange, handleEvent, handleFree, handleUpdate, hashCode, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, isValidEventType, lockRows, lookupInstanceLabel, performPostCreateExtensions, performPostFreeExtensions, performPostUpdateExtensions, performPreCreateExtensions, performPreFreeExtensions, performPreUpdateExtensions, postEvent, postEvent, postFree, preFree, prePostAuditEvent, putProperty, putProperty, removeAllProperties, removeAllSimpleProperties, removeAllSimpleProperties, removed, removeProperty, removeSimpleProperty, removeSimpleProperty, renderAsRandomAccessContent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setCopyContext, setFreeContext, setId, setName, setPropertyBundle, setPropertyValue, setUpdateContext, toString, trace, trustHandleCreate, trustHandleCreateAsAdmin, trustHandleFree, trustHandleFreeAsAdmin, trustHandleUpdate, trustHandleUpdateAsAdmin, update, updateAndExposeDefinition, validatePropertyValues, vectorLibraryObjectElement, vectorToLibraryObjectArray, verifyAdministrationMode, verifyConnected, verifyPersistent, verifySystemUserAccess, verifyTargetObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAttributeByUpperCaseName, getClassId, getId, getSessionInterfacegetTraceLogger, isTraced, tracepublic static final String CLASS_NAME
public static final String NAME_ATTRIBUTE
public static final String MIMETYPE_ATTRIBUTE
public static final String BINARY_ATTRIBUTE
public static final String INDEXED_ATTRIBUTE
public static final String EXTENSION_ATTRIBUTE
public static final String DEFAULT_FORMAT_NAME
protected Format(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session - current session contextid - object IDclassId - object's Class IDdata - the object's dataIfsException - if operation fails.public static Long getClassId(LibrarySession session) throws IfsException
session - the session contextIfsException - if the operation failspublic boolean hasNameAttribute()
throws IfsException
hasNameAttribute in class LibraryObjectIfsException - if operation fails.public String getExtension() throws IfsException
IfsException - on failurepublic void setExtension(String FileExtension) throws IfsException
FileExtension - a file extension to associate with this Format.IfsException - on failurepublic boolean isBinary()
throws IfsException
IfsException - on failurepublic void setBinary(boolean isBinary)
throws IfsException
isBinary - true if binary, false if textIfsException - on failurepublic boolean isIndexed()
throws IfsException
IfsException - if the operation failspublic String getMimeType() throws IfsException
IfsException - on failurepublic void setMimeType(String mimeType) throws IfsException
mimeType - a MIME type to associate with this Format.IfsExc2Yeption - on failureIfsExceptionpublic static Format getFormatByFilename(LibrarySession session, String filename) throws IfsException
session - the session contextfilename - the filename to map to a FormatIfsException - if the "bin" Format could not be found,
or if an error occurspublic static Format getDefaultFormat(LibrarySession session) throws IfsException
session - the session contextIfsException - if the default Format is not present, or
if an error occurspublic static LibraryObjectLookupCache getLibraryObjectLookupCache(LibrarySessionInterface session) throws IfsException
session - the session contextIfsException - if the operation fails.public static LibraryObjectLookupCache getLibraryObjectLookupCacheByExtension(LibrarySessionInterface session) throws IfsException
session - the session contextIfsException - if the operation fails.public static Format[] findAll(LibrarySession session) throws IfsException
The instances will be sorted by name.
session - the session contextIfsException - if the operation fails.public static Format findByName(LibrarySession session, String name) throws IfsException
session - the session contextname - the Format nameIfsException - if the operation fails.public static Format findByExtension(LibrarySession session, String extension) throws IfsException
session - the session contextextension - the Format extensionIfsException - if the operation fails.protected static Vector constructFormatVector(LibrarySession sess, Vector vector) throws IfsException
sess - - FixmeJavadocParamvector - - FixmeJavadocParamIfsException - if operation fails.protected static Format constructFormat(LibrarySession sess, S_LibraryObjectData data) throws IfsException
sess - - FixmeJavadocParamdata - - FixmeJavadocParamIfsException - if operation fails.protected static Format[] vectorToFormatArray(Vector vector)
vector - - FixmeJavadocParamCopyright © 2025. All rights reserved.