public class Base extends AbstractImpl
Modifier and Type | Class and Description |
---|---|
static interface |
Base.CodeMapper
Callback interface for mapping codes.
|
static class |
Base.Counter
Counter
|
static interface |
Base.RestInteractionCallback |
Modifier and Type | Field and Description |
---|---|
static List<String> |
ASSIGN_TO_ME_ATTRIBUTES |
static String |
COMMENT_SEPARATOR_BOT |
static String |
COMMENT_SEPARATOR_EOT |
static short |
IMPORT_EXPORT_FORMAT_NOT_SUPPORTED |
static short |
IMPORT_EXPORT_ITEM_NOT_VALID |
static short |
IMPORT_EXPORT_MISSING_DATA |
static short |
IMPORT_EXPORT_OK |
static String |
MIME_TYPE_ZIP |
static String |
PRIVATE_SUFFIX |
Modifier | Constructor and Description |
---|---|
protected |
Base()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowUpdateExistingIndexEntries()
Return true if updating of existing index entries is allowed.
|
String |
analyseReport(List<String> report)
Counts the number of occurences of items in report and returns a string
of the form item0: n0, item1: n1, etc.
|
void |
assignToMe(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 target,
boolean overwrite,
boolean useRunAsPrincipal)
Assign object to current principal.
|
void |
createOrUpdateMedia(CrxObject object,
String contentType,
String contentName,
InputStream content)
Create media from given input stream and create or update media to given CrxObject.
|
EnableDisableCrxObjectResult |
disableCrxObject(CrxObject crxObject,
short mode,
String reason)
Disable CrxObject.
|
EnableDisableCrxObjectResult |
enableCrxObject(CrxObject crxObject,
short mode,
String reason)
Enable CrxObject.
|
short |
enableDisableCrxObject(CrxObject object,
boolean disable,
String reason,
Base.Counter counter)
Recursively enable / disable given object(s).
|
String |
getAccessUrl(Object context,
String contextPattern,
org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object)
Create non-tiny GUI access URL for given object.
|
String |
getAccessUrl(Object context,
String contextPattern,
org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object,
boolean asTinyUrl)
Create GUI access URL for given object.
|
List<org.openmdx.base.naming.Path> |
getIndexableTypes()
Get list of types which are subject to be indexed.
|
static Base |
getInstance()
Get backend instance.
|
List<String> |
getKeywords(javax.resource.cci.MappedRecord object,
Integer keywordLengthMin,
Integer keywordLengthMax,
Set<String> indexedAttributes,
Base.RestInteractionCallback restInteractionCallback)
Extract keywords from object.
|
String |
getTitle(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 refObj,
Base.CodeMapper codeMapper,
short locale,
boolean asShortTitle)
Return display title of given object.
|
boolean |
isAccessUrl(String url)
Test if given URL matches application GUI access URL.
|
protected org.openmdx.base.rest.cci.QueryRecord |
newQuery(org.openmdx.base.naming.Path resourceIdentifier)
Create new query record.
|
protected org.openmdx.base.rest.cci.ResultRecord |
newResult()
Create new result record.
|
static void |
register()
Register backend.
|
protected org.openmdx.base.rest.cci.ObjectRecord |
retrieveObject(Base.RestInteractionCallback restInteractionCallback,
org.openmdx.base.naming.Path resourceIdentifier,
String fetchGroupName)
Retrieve object with given identity.
|
protected org.openmdx.base.rest.cci.ResultRecord |
retrieveObjects(Base.RestInteractionCallback restInteractionCallback,
org.openmdx.base.naming.Path resourceIdentifier,
org.openmdx.base.rest.cci.QueryRecord query,
String fetchGroupName)
Retrieve objects with given identity matching the given query.
|
void |
sendAlert(org.openmdx.base.jmi1.ContextCapable target,
String toUsers,
String name,
String description,
short importance,
Integer resendDelayInSeconds,
org.openmdx.base.jmi1.ContextCapable reference)
Send alert to given users.
|
String |
toPlain(Object obj)
Returns toString() of the given object.
|
void |
updateIndexEntry(Base.RestInteractionCallback restInteractionCallback,
org.openmdx.base.rest.cci.ObjectRecord indexEntry)
Create a new index entry or update existing.
|
getInstance, getPersistenceManager, getUidAsString, preDelete, preStore, registerImpl
public static final String PRIVATE_SUFFIX
public static final short IMPORT_EXPORT_OK
public static final short IMPORT_EXPORT_FORMAT_NOT_SUPPORTED
public static final short IMPORT_EXPORT_ITEM_NOT_VALID
public static final short IMPORT_EXPORT_MISSING_DATA
public static final String MIME_TYPE_ZIP
public static final String COMMENT_SEPARATOR_BOT
public static final String COMMENT_SEPARATOR_EOT
public static void register()
public static Base getInstance() throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public void sendAlert(org.openmdx.base.jmi1.ContextCapable target, String toUsers, String name, String description, short importance, Integer resendDelayInSeconds, org.openmdx.base.jmi1.ContextCapable reference) throws org.openmdx.base.exception.ServiceException
target
- toUsers
- name
- description
- importance
- resendDelayInSeconds
- reference
- org.openmdx.base.exception.ServiceException
public void assignToMe(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 target, boolean overwrite, boolean useRunAsPrincipal) throws org.openmdx.base.exception.ServiceException
target
- overwrite
- useRunAsPrincipal
- org.openmdx.base.exception.ServiceException
public String analyseReport(List<String> report)
report
- public String getAccessUrl(Object context, String contextPattern, org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object)
context
- contextPattern
- object
- public String getAccessUrl(Object context, String contextPattern, org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object, boolean asTinyUrl)
context
- contextPattern
- object
- asTinyUrl
- public boolean isAccessUrl(String url)
url
- public void createOrUpdateMedia(CrxObject object, String contentType, String contentName, InputStream content) throws IOException
object
- contentType
- contentName
- content
- IOException
public String toPlain(Object obj)
obj
- public String getTitle(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 refObj, Base.CodeMapper codeMapper, short locale, boolean asShortTitle) throws org.openmdx.base.exception.ServiceException
refObj
- codes
- texts
- locale
- asShortTitle
- org.openmdx.base.exception.ServiceException
public short enableDisableCrxObject(CrxObject object, boolean disable, String reason, Base.Counter counter)
object
- disable
- reason
- counter
- public EnableDisableCrxObjectResult disableCrxObject(CrxObject crxObject, short mode, String reason) throws org.openmdx.base.exception.ServiceException
crxObject
- mode
- reason
- org.openmdx.base.exception.ServiceException
public EnableDisableCrxObjectResult enableCrxObject(CrxObject crxObject, short mode, String reason) throws org.openmdx.base.exception.ServiceException
crxObject
- mode
- reason
- org.openmdx.base.exception.ServiceException
public List<org.openmdx.base.naming.Path> getIndexableTypes()
protected org.openmdx.base.rest.cci.ResultRecord newResult() throws javax.resource.ResourceException
javax.resource.ResourceException
protected org.openmdx.base.rest.cci.QueryRecord newQuery(org.openmdx.base.naming.Path resourceIdentifier)
resourceIdentifier
- protected org.openmdx.base.rest.cci.ObjectRecord retrieveObject(Base.RestInteractionCallback restInteractionCallback, org.openmdx.base.naming.Path resourceIdentifier, String fetchGroupName) throws javax.resource.ResourceException
resourceIdentifier
- fetchGroupName
- javax.resource.ResourceException
protected org.openmdx.base.rest.cci.ResultRecord retrieveObjects(Base.RestInteractionCallback restInteractionCallback, org.openmdx.base.naming.Path resourceIdentifier, org.openmdx.base.rest.cci.QueryRecord query, String fetchGroupName) throws javax.resource.ResourceException
resourceIdentifier
- query
- fetchGroupName
- javax.resource.ResourceException
public List<String> getKeywords(javax.resource.cci.MappedRecord object, Integer keywordLengthMin, Integer keywordLengthMax, Set<String> indexedAttributes, Base.RestInteractionCallback restInteractionCallback) throws org.openmdx.base.exception.ServiceException, javax.resource.ResourceException
object
- org.openmdx.base.exception.ServiceException
javax.resource.ResourceException
public boolean allowUpdateExistingIndexEntries()
public void updateIndexEntry(Base.RestInteractionCallback restInteractionCallback, org.openmdx.base.rest.cci.ObjectRecord indexEntry) throws org.openmdx.base.exception.ServiceException, javax.resource.ResourceException
restInteractionCallback
- indexEntry
- org.openmdx.base.exception.ServiceException
javax.resource.ResourceException
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.