public final class Repository
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ERROR_EXISTS |
static java.lang.String |
ERROR_GENERIC |
static java.lang.String |
ERROR_NODEREF
I18N error messages
|
static java.lang.String |
ERROR_NOHOME |
static java.lang.String |
ERROR_QUERY |
static java.lang.String |
ERROR_SEARCH |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
escapeQName(org.alfresco.service.namespace.QName qName)
Escape a QName value so it can be used in lucene search strings
|
static boolean |
extractMetadata(javax.faces.context.FacesContext context,
org.alfresco.service.cmr.repository.ContentReader reader,
java.util.Map destination)
Extracts the metadata of a "raw" piece of content into a map.
|
static org.alfresco.service.cmr.repository.NodeRef |
getCompanyRoot(javax.faces.context.FacesContext context)
Returns a company root node reference object.
|
static org.alfresco.service.cmr.repository.NodeRef |
getCompanyRoot(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.search.SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService,
org.alfresco.service.cmr.repository.StoreRef storeRef,
java.lang.String rootPath)
Returns a company root node reference object.
|
static org.alfresco.repo.configuration.ConfigurableService |
getConfigurableService(javax.faces.context.FacesContext context)
Return the Configurable Service
|
static java.lang.String |
getDisplayPath(org.alfresco.service.cmr.repository.Path path)
Return the human readable form of the specified node Path.
|
static java.lang.String |
getDisplayPath(org.alfresco.service.cmr.repository.Path path,
boolean showLeaf)
Return the human readable form of the specified node Path.
|
static boolean |
getIsGuest(javax.faces.context.FacesContext context) |
static org.alfresco.repo.content.metadata.MetadataExtracterRegistry |
getMetadataExtracterRegistry(javax.faces.context.FacesContext context)
Return the Metadata Extracter Registry
|
static java.lang.String |
getMimeTypeForFile(javax.faces.context.FacesContext context,
java.lang.String filename,
java.io.File file)
Return the mimetype for the specified file, based on both the
file name and the file's contents.
|
static java.lang.String |
getMimeTypeForFileName(javax.faces.context.FacesContext context,
java.lang.String filename)
Return the mimetype for the specified file name.
|
static java.lang.String |
getNameForCategoryNode(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef ref)
Helper to get the display name path for a category node.
|
static java.lang.String |
getNameForNode(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef ref)
Helper to get the display name for a Node.
|
static java.lang.String |
getNamePath(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.Path path,
org.alfresco.service.cmr.repository.NodeRef rootNode,
java.lang.String separator,
java.lang.String prefix)
Resolve a Path by converting each element into its display NAME attribute
|
static java.lang.String |
getNamePathEx(javax.faces.context.FacesContext context,
org.alfresco.service.cmr.repository.Path path,
org.alfresco.service.cmr.repository.NodeRef rootNode,
java.lang.String separator,
java.lang.String prefix)
Resolve a Path by converting each element into its display NAME attribute.
|
static org.alfresco.repo.transaction.RetryingTransactionHelper |
getRetryingTransactionHelper(javax.faces.context.FacesContext context)
Returns the transaction helper that executes a unit of work.
|
static org.alfresco.service.ServiceRegistry |
getServiceRegistry(javax.faces.context.FacesContext context)
Return the Repository Service Registry
|
static org.alfresco.service.ServiceRegistry |
getServiceRegistry(javax.servlet.ServletContext context)
Return the Repository Service Registry
|
static org.alfresco.service.cmr.repository.StoreRef |
getStoreRef()
Returns a store reference object
|
static org.alfresco.service.cmr.repository.StoreRef |
getStoreRef(javax.servlet.ServletContext context)
Returns a store reference object.
|
static java.util.List |
getUsers(javax.faces.context.FacesContext context,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.security.PersonService personService)
Query a list of Person type nodes from the repo
It is currently assumed that all Person nodes exist below the Repository root node
|
static java.util.List |
getUsers(javax.faces.context.FacesContext context,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.search.SearchService searchService)
Deprecated.
|
static javax.transaction.UserTransaction |
getUserTransaction(javax.faces.context.FacesContext context)
Deprecated.
|
static javax.transaction.UserTransaction |
getUserTransaction(javax.faces.context.FacesContext context,
boolean readonly)
Return a UserTransaction instance
|
static java.lang.String |
guessEncoding(javax.faces.context.FacesContext context,
java.io.InputStream is,
java.lang.String mimetype)
Extract the characterset from the stream
|
static java.lang.Boolean |
isNodeLocked(Node node,
org.alfresco.service.cmr.lock.LockService lockService)
Return whether a Node is currently locked
|
static java.lang.Boolean |
isNodeOwnerLocked(Node node,
org.alfresco.service.cmr.lock.LockService lockService)
Return whether a Node is currently locked by the current user
|
static org.alfresco.service.namespace.QName |
resolveToQName(java.lang.String str)
Creates a QName representation for the given String.
|
static java.lang.String |
resolveToQNameString(java.lang.String str)
Creates a string representation of a QName for the given string.
|
static java.lang.String |
safePropertyToString(java.io.Serializable value)
Convert a property of unknown type to a String value.
|
static void |
setupBreadcrumbLocation(javax.faces.context.FacesContext context,
NavigationBean navBean,
java.util.List location,
org.alfresco.service.cmr.repository.NodeRef node)
Sets up the breadcrumb location representation for the given node in
the given list.
|
public static final java.lang.String ERROR_NODEREF
public static final java.lang.String ERROR_GENERIC
public static final java.lang.String ERROR_NOHOME
public static final java.lang.String ERROR_SEARCH
public static final java.lang.String ERROR_QUERY
public static final java.lang.String ERROR_EXISTS
public static org.alfresco.service.cmr.repository.StoreRef getStoreRef()
public static org.alfresco.service.cmr.repository.StoreRef getStoreRef(javax.servlet.ServletContext context)
public static org.alfresco.service.cmr.repository.NodeRef getCompanyRoot(javax.faces.context.FacesContext context)
public static org.alfresco.service.cmr.repository.NodeRef getCompanyRoot(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.search.SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService,
org.alfresco.service.cmr.repository.StoreRef storeRef,
java.lang.String rootPath)
public static java.lang.String getNameForNode(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef ref)
ref - NodeRefpublic static java.lang.String getNameForCategoryNode(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef ref)
nodeService - ref - the category node refpublic static java.lang.String escapeQName(org.alfresco.service.namespace.QName qName)
qName - QName to escapepublic static java.lang.Boolean isNodeLocked(Node node, org.alfresco.service.cmr.lock.LockService lockService)
node - The Node wrapper to test againstlockService - The LockService to usepublic static java.lang.Boolean isNodeOwnerLocked(Node node, org.alfresco.service.cmr.lock.LockService lockService)
node - The Node wrapper to test againstlockService - The LockService to usepublic static java.lang.String getDisplayPath(org.alfresco.service.cmr.repository.Path path)
path - Path to extract readable form from, excluding the final elementpublic static java.lang.String getDisplayPath(org.alfresco.service.cmr.repository.Path path,
boolean showLeaf)
path - Path to extract readable form fromshowLeaf - Whether to process the final leaf element of the pathpublic static java.lang.String getNamePath(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.Path path,
org.alfresco.service.cmr.repository.NodeRef rootNode,
java.lang.String separator,
java.lang.String prefix)
path - Path to convertseparator - Separator to user between path elementsprefix - To prepend to the pathpublic static void setupBreadcrumbLocation(javax.faces.context.FacesContext context,
NavigationBean navBean,
java.util.List location,
org.alfresco.service.cmr.repository.NodeRef node)
context - FacesContextnavBean - NavigationBean instancelocation - The location list to setupnode - The Node being navigated topublic static java.lang.String getNamePathEx(javax.faces.context.FacesContext context,
org.alfresco.service.cmr.repository.Path path,
org.alfresco.service.cmr.repository.NodeRef rootNode,
java.lang.String separator,
java.lang.String prefix)
path - Path to convertseparator - Separator to user between path elementsprefix - To prepend to the pathpublic static java.lang.String getMimeTypeForFileName(javax.faces.context.FacesContext context,
java.lang.String filename)
The file extension will be extracted from the filename and used to lookup the mimetype.
context - FacesContextfilename - Non-null filename to processpublic static java.lang.String getMimeTypeForFile(javax.faces.context.FacesContext context,
java.lang.String filename,
java.io.File file)
The file extension will be extracted from the filename and used along with the file contents to identify the mimetype.
context - FacesContextfilename - Non-null filename to processfile - The File object (used to read the contents)public static javax.transaction.UserTransaction getUserTransaction(javax.faces.context.FacesContext context)
context - FacesContextRepository.getRetryingTransactionHelper(FacesContext)public static org.alfresco.repo.transaction.RetryingTransactionHelper getRetryingTransactionHelper(javax.faces.context.FacesContext context)
context - FacesContextpublic static javax.transaction.UserTransaction getUserTransaction(javax.faces.context.FacesContext context,
boolean readonly)
context - FacesContextreadonly - Transaction readonly statepublic static org.alfresco.service.ServiceRegistry getServiceRegistry(javax.faces.context.FacesContext context)
context - Faces Contextpublic static org.alfresco.service.ServiceRegistry getServiceRegistry(javax.servlet.ServletContext context)
context - Servlet Contextpublic static org.alfresco.repo.configuration.ConfigurableService getConfigurableService(javax.faces.context.FacesContext context)
public static org.alfresco.repo.content.metadata.MetadataExtracterRegistry getMetadataExtracterRegistry(javax.faces.context.FacesContext context)
context - Faces Contextpublic static boolean extractMetadata(javax.faces.context.FacesContext context,
org.alfresco.service.cmr.repository.ContentReader reader,
java.util.Map destination)
context - Faces Contextreader - Content reader for the source content to extract fromdestination - Map of metadata to set metadata values intopublic static java.lang.String guessEncoding(javax.faces.context.FacesContext context,
java.io.InputStream is,
java.lang.String mimetype)
context - the Faces Contextis - the stream of characters or datamimetype - the stream's mimetype, or null if unknownpublic static java.util.List getUsers(javax.faces.context.FacesContext context,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.search.SearchService searchService)
Repository.getUsers(FacesContext, NodeService, PersonService) insteadcontext - Faces ContextnodeService - The node servicesearchService - The search service, which is ignoredpublic static java.util.List getUsers(javax.faces.context.FacesContext context,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.security.PersonService personService)
context - Faces ContextnodeService - The node servicesearchService - used to perform the searchpublic static boolean getIsGuest(javax.faces.context.FacesContext context)
public static java.lang.String safePropertyToString(java.io.Serializable value)
value - Property valuepublic static org.alfresco.service.namespace.QName resolveToQName(java.lang.String str)
str - The string to convertpublic static java.lang.String resolveToQNameString(java.lang.String str)
str - The string to convertCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.