public class JSONConversionComponent extends Object
Modifier and Type | Field and Description |
---|---|
protected ContentService |
contentService |
protected FileFolderService |
fileFolderService |
protected LockService |
lockService |
protected org.alfresco.service.cmr.repository.MimetypeService |
mimetypeService |
protected static ThreadLocal<Map<String,String>> |
namespacePrefixCache
Thread local cache of namespace prefixes for long QName to short prefix name conversions
|
protected org.alfresco.service.namespace.NamespaceService |
namespaceService |
protected org.alfresco.service.cmr.repository.NodeService |
nodeService
Services
|
protected org.alfresco.service.cmr.security.PermissionService |
permissionService |
protected Map<org.alfresco.service.namespace.QName,PropertyDecorator> |
propertyDecorators
Registered decorators
|
protected PublicServiceAccessService |
publicServiceAccessService |
protected String[] |
userPermissions
User permissions
|
Constructor and Description |
---|
JSONConversionComponent() |
Modifier and Type | Method and Description |
---|---|
protected org.json.simple.JSONArray |
allSetPermissionsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Handles the work of converting all set permissions to JSON.
|
protected org.json.simple.JSONArray |
apsectsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean useShortQNames)
Handles the work of converting aspects to JSON.
|
protected org.json.simple.JSONObject |
permissionsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Handles the work of converting node permissions to JSON.
|
protected org.json.simple.JSONObject |
propertiesToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Map<org.alfresco.service.namespace.QName,Serializable> properties,
boolean useShortQNames) |
protected Object |
propertyToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyName,
String key,
Serializable value)
Handles the work of converting values to JSON.
|
void |
registerPropertyDecorator(PropertyDecorator propertyDecorator)
Register a property decorator;
|
void |
setContentService(ContentService contentService) |
void |
setFileFolderService(FileFolderService fileFolderService) |
void |
setLockService(LockService lockService) |
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setPublicServiceAccessService(PublicServiceAccessService publicServiceAccessService) |
protected void |
setRootValues(FileInfo nodeInfo,
org.json.simple.JSONObject rootJSONObject,
boolean useShortQNames) |
void |
setUserPermissions(String[] userPermissions) |
String |
toJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean useShortQNames)
Convert a node reference to a JSON string.
|
org.json.simple.JSONObject |
toJSONObject(org.alfresco.service.cmr.repository.NodeRef nodeRef,
boolean useShortQNames)
Convert a node reference to a JSON object.
|
protected org.json.simple.JSONObject |
userPermissionsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Handles the work of converting user permissions to JSON.
|
protected Map<org.alfresco.service.namespace.QName,PropertyDecorator> propertyDecorators
protected String[] userPermissions
protected static ThreadLocal<Map<String,String>> namespacePrefixCache
protected org.alfresco.service.cmr.repository.NodeService nodeService
protected PublicServiceAccessService publicServiceAccessService
protected org.alfresco.service.namespace.NamespaceService namespaceService
protected FileFolderService fileFolderService
protected LockService lockService
protected ContentService contentService
protected org.alfresco.service.cmr.security.PermissionService permissionService
protected org.alfresco.service.cmr.repository.MimetypeService mimetypeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- node servicepublic void setPublicServiceAccessService(PublicServiceAccessService publicServiceAccessService)
publicServiceAccessService
- public service access servicepublic void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
namespaceService
- namespace servicepublic void setFileFolderService(FileFolderService fileFolderService)
fileFolderService
- file folder servicepublic void setLockService(LockService lockService)
lockService
- lock servicepublic void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
permissionService
- permission servicepublic void setUserPermissions(String[] userPermissions)
userPermissions
- user permissionspublic void setContentService(ContentService contentService)
contentService
- content servicepublic void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
mimetypeService
- mimetype servicepublic void registerPropertyDecorator(PropertyDecorator propertyDecorator)
propertyDecorator
- PropertyDecoratorpublic String toJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean useShortQNames)
public org.json.simple.JSONObject toJSONObject(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean useShortQNames)
protected void setRootValues(FileInfo nodeInfo, org.json.simple.JSONObject rootJSONObject, boolean useShortQNames)
nodeInfo
- FileInforootJSONObject
- JSONObjectuseShortQNames
- booleanprotected org.json.simple.JSONObject permissionsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- NodeRefprotected org.json.simple.JSONObject userPermissionsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- NodeRefprotected Object propertyToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName propertyName, String key, Serializable value)
nodeRef
- NodeRefpropertyName
- QNamekey
- Stringvalue
- Serializableprotected org.json.simple.JSONObject propertiesToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef, Map<org.alfresco.service.namespace.QName,Serializable> properties, boolean useShortQNames)
nodeRef
- NodeRefuseShortQNames
- booleanprotected org.json.simple.JSONArray apsectsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean useShortQNames)
nodeRef
- NodeRefuseShortQNames
- booleanprotected org.json.simple.JSONArray allSetPermissionsToJSON(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- NodeRefCopyright © 2005–2017 Alfresco Software. All rights reserved.