public class OwShortCutItemOwObject extends OwShortCutItem
Implementation of a shortcut item for object references.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Modifier and Type | Class and Description |
---|---|
protected static class |
OwShortCutItemOwObject.OwDependentObjectReference
Helper class for handling dependent object reference.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PATH_DELIMITER
delimiter used to build the object path in the object tree
|
protected int |
m_iMaxChildSize
maximum number of child nodes
|
protected static String |
SUBPATH_DELIMITER
delimiter for the subpath in the persist string
|
persistentId, TYPE_DELIMITER
Modifier | Constructor and Description |
---|---|
protected |
OwShortCutItemOwObject(com.wewebu.ow.server.ecm.OwObjectReference ref_p)
creates a short cut from the given OwObject Reference
|
|
OwShortCutItemOwObject(com.wewebu.ow.server.ecm.OwObjectReference root,
com.wewebu.ow.server.ecm.OwObjectReference target,
String displayPath,
String idPath)
Constructor for path specific definition
|
|
OwShortCutItemOwObject(com.wewebu.ow.server.ecm.OwObjectReference ref_p,
String path_p,
String subdisplaypath_p,
int maxChildSize_p)
Deprecated.
since 4.1.1.1 use
OwShortCutItemOwObject(OwObjectReference, OwObjectReference, String, String) instead |
protected |
OwShortCutItemOwObject(String persistString_p,
OwShortCutItemContext context_p,
int maxChildSize_p)
reconstruct the short cut from the given string
|
Modifier and Type | Method and Description |
---|---|
static OwShortCutItem |
createShortCutItem(com.wewebu.ow.server.ecm.OwObjectReference object_p,
String path_p,
String subdisplaypath_p,
int maxChildSize_p)
Deprecated.
since 4.1.1.1 caused by performance problems, use direct constructor
OwShortCutItemOwObject(OwObjectReference, OwObjectReference, String, String) instead |
static Collection |
createShortCutItems(Collection objects_p)
create a collection of OwShortCutItem's from the given collection of OwObject's
|
protected com.wewebu.ow.server.ecm.OwObjectReference |
findPathReference(com.wewebu.ow.server.ecm.OwObjectReference root_p,
String path_p,
String pathDelimiter_p)
Deprecated.
since 4.1.1.1 searching by path must be done in upper level (business logic)
|
String |
getId()
Get the ID of the shortcut.
|
String |
getName()
get the name of the shortcut
|
com.wewebu.ow.server.ecm.OwObjectReference |
getObjRef() |
protected String |
getPersistString()
get a string that persists the short cut.
|
int |
getType()
get the type of the short cut as defined in OwClipboard.CONTENT_TYPE_OW_...
|
void |
insertIcon(OwShortCutItemContext context_p,
Writer w_p)
render a icon link for this short cut
|
void |
insertLabel(OwShortCutItemContext context_p,
Writer w_p)
render a label link for this short cut
|
void |
refresh(com.wewebu.ow.server.ecm.OwRepository repository_p)
Refresh current
OwShortCutItem to have the latest version of the object. |
protected com.wewebu.ow.server.ecm.OwObject |
replaceWithLatestVersion(com.wewebu.ow.server.ecm.OwObject source_p)
Replace the given
OwObject source object with its latest version |
String |
toString() |
protected com.wewebu.ow.server.ecm.OwObjectReference |
updateObjectReference(com.wewebu.ow.server.ecm.OwRepository repository_p,
com.wewebu.ow.server.ecm.OwObjectReference originalReference_p)
Get the
OwStandardObjectReference corresponding to the latest version of the OwObject |
getPersistentId, loadShortCut, saveShortCut
public static final String DEFAULT_PATH_DELIMITER
protected static final String SUBPATH_DELIMITER
protected int m_iMaxChildSize
protected OwShortCutItemOwObject(String persistString_p, OwShortCutItemContext context_p, int maxChildSize_p) throws Exception
persistString_p
- context_p
- maxChildSize_p
- number of maximum children to be searched when retrieving the pointed object referenceException
getPersistString()
protected OwShortCutItemOwObject(com.wewebu.ow.server.ecm.OwObjectReference ref_p)
ref_p
- @Deprecated public OwShortCutItemOwObject(com.wewebu.ow.server.ecm.OwObjectReference ref_p, String path_p, String subdisplaypath_p, int maxChildSize_p)
OwShortCutItemOwObject(OwObjectReference, OwObjectReference, String, String)
insteadref_p
- the root object referencepath_p
- relative path to the pointed objectsubdisplaypath_p
- the path to be displayed for this shortcut in the shortcut viewsmaxChildSize_p
- number of maximum children to be searched when retrieving the pointed object referencepublic OwShortCutItemOwObject(com.wewebu.ow.server.ecm.OwObjectReference root, com.wewebu.ow.server.ecm.OwObjectReference target, String displayPath, String idPath)
root
- OwObjectReference which is the root of the pathtarget
- OwObjectReference which is descendant of root (level unknown)displayPath
- String readable/displayable path (may be used for retrieval)idPath
- String path based on Id's@Deprecated protected com.wewebu.ow.server.ecm.OwObjectReference findPathReference(com.wewebu.ow.server.ecm.OwObjectReference root_p, String path_p, String pathDelimiter_p) throws Exception
root_p
- the root objectpath_p
- the relative path to search the reference inpathDelimiter_p
- the delimiter used in constructing the pathOwObjectReference
for the object found under the given path relative to the given root objectException
public String getName()
getName
in class OwShortCutItem
String
public String getId() throws Exception
getId
in class OwShortCutItem
Exception
public static Collection createShortCutItems(Collection objects_p)
objects_p
- Collection of OwObjectReference
s@Deprecated public static OwShortCutItem createShortCutItem(com.wewebu.ow.server.ecm.OwObjectReference object_p, String path_p, String subdisplaypath_p, int maxChildSize_p)
OwShortCutItemOwObject(OwObjectReference, OwObjectReference, String, String)
insteadobject_p
- path_p
- subdisplaypath_p
- maxChildSize_p
- OwShortCutItem
protected String getPersistString() throws Exception
getPersistString
in class OwShortCutItem
Exception
public int getType()
getType
in class OwShortCutItem
public void insertIcon(OwShortCutItemContext context_p, Writer w_p) throws Exception
insertIcon
in class OwShortCutItem
Exception
public void insertLabel(OwShortCutItemContext context_p, Writer w_p) throws Exception
insertLabel
in class OwShortCutItem
Exception
public com.wewebu.ow.server.ecm.OwObjectReference getObjRef()
public void refresh(com.wewebu.ow.server.ecm.OwRepository repository_p) throws com.wewebu.ow.server.exceptions.OwException
OwShortCutItem
OwShortCutItem
to have the latest version of the object.refresh
in class OwShortCutItem
repository_p
- - the repositorycom.wewebu.ow.server.exceptions.OwException
- if refresh could not be processed (since 4.2.0.0)protected com.wewebu.ow.server.ecm.OwObjectReference updateObjectReference(com.wewebu.ow.server.ecm.OwRepository repository_p, com.wewebu.ow.server.ecm.OwObjectReference originalReference_p) throws Exception
OwStandardObjectReference
corresponding to the latest version of the OwObject
repository_p
- originalReference_p
- OwStandardObjectReference
updated.Exception
protected com.wewebu.ow.server.ecm.OwObject replaceWithLatestVersion(com.wewebu.ow.server.ecm.OwObject source_p) throws com.wewebu.ow.server.exceptions.OwException
OwObject
source object with its latest versionsource_p
- - the stored OwObject
source.OwObject
if no version is available.com.wewebu.ow.server.exceptions.OwException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.