Class MetadataServiceImpl
java.lang.Object
org.exoplatform.social.core.metadata.MetadataServiceImpl
- All Implemented Interfaces:
org.exoplatform.social.metadata.MetadataService,org.picocontainer.Startable
public class MetadataServiceImpl
extends Object
implements org.exoplatform.social.metadata.MetadataService, org.picocontainer.Startable
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataServiceImpl(MetadataStorage metadataStorage, org.exoplatform.services.listener.ListenerService listenerService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMetadataPlugin(org.exoplatform.social.metadata.MetadataInitPlugin metadataInitPlugin) voidaddMetadataTypePlugin(org.exoplatform.social.metadata.MetadataTypePlugin metadataTypePlugin) longcountMetadataIdsByProperty(String propertyKey, String propertyValue) countMetadataItemsByMetadataTypeAndAudienceId(String metadataTypeName, long creatorId, long spaceId) intcountMetadataItemsByMetadataTypeAndCreator(String metadataTypeName, long creatorId) countMetadataItemsByMetadataTypeAndSpacesIdAndCreatorId(String metadataTypeName, long creatorId, List<Long> spacesId) org.exoplatform.social.metadata.model.MetadatacreateMetadata(org.exoplatform.social.metadata.model.Metadata metadata, long userIdentityId) org.exoplatform.social.metadata.model.MetadataItemcreateMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, long userIdentityId) org.exoplatform.social.metadata.model.MetadataItemcreateMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, Map<String, String> properties) org.exoplatform.social.metadata.model.MetadataItemcreateMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, Map<String, String> properties, boolean broadcast) org.exoplatform.social.metadata.model.MetadataItemcreateMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, Map<String, String> properties, long userIdentityId) org.exoplatform.social.metadata.model.MetadataItemcreateMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, Map<String, String> properties, long userIdentityId, boolean broadcast) intdeleteByMetadataItemsTypeAndUntilCreationDate(String metadataTypeName, long untilDate) voiddeleteByMetadataTypeAndCreatorId(String metadataTypeName, long userIdentityId) voiddeleteByMetadataTypeAndSpaceIdAndCreatorId(String metadataTypeName, long spaceId, long userIdentityId) org.exoplatform.social.metadata.model.MetadatadeleteMetadataById(long metadataId) intdeleteMetadataBySpaceId(long spaceId) intdeleteMetadataBySpaceIdAndAudienceId(long spaceId, long audienceId) org.exoplatform.social.metadata.model.MetadataItemdeleteMetadataItem(long itemId, boolean broadcast) org.exoplatform.social.metadata.model.MetadataItemdeleteMetadataItem(long itemId, long userIdentityId) voiddeleteMetadataItemsByMetadataTypeAndObject(String metadataType, org.exoplatform.social.metadata.model.MetadataObject object) voiddeleteMetadataItemsByObject(org.exoplatform.social.metadata.model.MetadataObject object) voiddeleteMetadataItemsByParentObject(org.exoplatform.social.metadata.model.MetadataObject object) findMetadataNamesByAudiences(String term, String metadataTypeName, Set<Long> audienceIds, long limit) findMetadataNamesByCreator(String term, String metadataTypeName, long creatorId, long limit) findMetadataNamesByUserAndQuery(String term, String metadataTypeName, Set<Long> audienceIds, long creatorId, long limit) org.exoplatform.social.metadata.model.MetadatagetMetadataById(long id) org.exoplatform.social.metadata.model.MetadatagetMetadataByKey(org.exoplatform.social.metadata.model.MetadataKey metadataKey) getMetadataIdsByProperty(String propertyKey, String propertyValue, long offset, long limit) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByFilter(org.exoplatform.social.metadata.MetadataFilter filter, long offset, long limit) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataAndObject(org.exoplatform.social.metadata.model.MetadataKey metadataKey, org.exoplatform.social.metadata.model.MetadataObject object) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObject(String metadataName, String metadataTypeName, String objectType, long offset, long limit) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObject(String metadataName, String metadataTypeName, String objectType, String objectId, long offset, long limit) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObjectAndMetadataItemProperty(String metadataName, String metadataTypeName, String objectType, String propertyKey, String propertyValue, long offset, long limit) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceId(String metadataName, String metadataTypeName, String objectType, long spaceId, long offset, long limit) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceIds(String metadataName, String metadataTypeName, String objectType, List<Long> spaceIds, long offset, long limit) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndSpaceIds(String metadataName, String metadataTypeName, List<Long> spaceIds, long offset, long limit) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataTypeAndCreator(String metadataTypeName, long creatorId, long offset, long limit) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataTypeAndObject(String metadataType, org.exoplatform.social.metadata.model.MetadataObject object) List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByObject(org.exoplatform.social.metadata.model.MetadataObject object) getMetadataNamesByMetadataTypeAndObject(String metadataTypeName, String objectType, String objectId) getMetadataNamesByObject(org.exoplatform.social.metadata.model.MetadataObject object) getMetadataObjectIds(String metadataType, String metadataName, String objectType, long offset, long limit) List<org.exoplatform.social.metadata.model.Metadata> getMetadatas(String metadataTypeName, long limit) List<org.exoplatform.social.metadata.model.Metadata> getMetadatasByProperty(String propertyKey, String propertyValue, long limit) org.exoplatform.social.metadata.model.MetadataTypegetMetadataTypeByName(String name) org.exoplatform.social.metadata.MetadataTypePluginList<org.exoplatform.social.metadata.model.MetadataType> List<org.exoplatform.social.metadata.model.MetadataItem> shareMetadataItemsByObject(org.exoplatform.social.metadata.model.MetadataObject sourceObject, String targetObjectId, long audienceId, long creatorId) voidstart()voidstop()org.exoplatform.social.metadata.model.MetadataupdateMetadata(org.exoplatform.social.metadata.model.Metadata metadata, long userIdentityId) org.exoplatform.social.metadata.model.MetadataItemupdateMetadataItem(org.exoplatform.social.metadata.model.MetadataItem metadataItem, long userIdentityId) org.exoplatform.social.metadata.model.MetadataItemupdateMetadataItem(org.exoplatform.social.metadata.model.MetadataItem metadataItem, long userIdentityId, boolean broadcast)
-
Constructor Details
-
MetadataServiceImpl
public MetadataServiceImpl(MetadataStorage metadataStorage, org.exoplatform.services.listener.ListenerService listenerService)
-
-
Method Details
-
createMetadata
public org.exoplatform.social.metadata.model.Metadata createMetadata(org.exoplatform.social.metadata.model.Metadata metadata, long userIdentityId) - Specified by:
createMetadatain interfaceorg.exoplatform.social.metadata.MetadataService
-
updateMetadata
public org.exoplatform.social.metadata.model.Metadata updateMetadata(org.exoplatform.social.metadata.model.Metadata metadata, long userIdentityId) - Specified by:
updateMetadatain interfaceorg.exoplatform.social.metadata.MetadataService
-
deleteMetadataById
public org.exoplatform.social.metadata.model.Metadata deleteMetadataById(long metadataId) - Specified by:
deleteMetadataByIdin interfaceorg.exoplatform.social.metadata.MetadataService
-
deleteMetadataBySpaceId
public int deleteMetadataBySpaceId(long spaceId) - Specified by:
deleteMetadataBySpaceIdin interfaceorg.exoplatform.social.metadata.MetadataService
-
deleteMetadataBySpaceIdAndAudienceId
public int deleteMetadataBySpaceIdAndAudienceId(long spaceId, long audienceId) - Specified by:
deleteMetadataBySpaceIdAndAudienceIdin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataByKey
public org.exoplatform.social.metadata.model.Metadata getMetadataByKey(org.exoplatform.social.metadata.model.MetadataKey metadataKey) - Specified by:
getMetadataByKeyin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataById
public org.exoplatform.social.metadata.model.Metadata getMetadataById(long id) - Specified by:
getMetadataByIdin interfaceorg.exoplatform.social.metadata.MetadataService
-
createMetadataItem
public org.exoplatform.social.metadata.model.MetadataItem createMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, long userIdentityId) throws org.exoplatform.social.common.ObjectAlreadyExistsException - Specified by:
createMetadataItemin interfaceorg.exoplatform.social.metadata.MetadataService- Throws:
org.exoplatform.social.common.ObjectAlreadyExistsException
-
createMetadataItem
public org.exoplatform.social.metadata.model.MetadataItem createMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, Map<String, String> properties, long userIdentityId, boolean broadcast) throws org.exoplatform.social.common.ObjectAlreadyExistsException- Specified by:
createMetadataItemin interfaceorg.exoplatform.social.metadata.MetadataService- Throws:
org.exoplatform.social.common.ObjectAlreadyExistsException
-
createMetadataItem
public org.exoplatform.social.metadata.model.MetadataItem createMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, Map<String, String> properties, long userIdentityId) throws org.exoplatform.social.common.ObjectAlreadyExistsException- Specified by:
createMetadataItemin interfaceorg.exoplatform.social.metadata.MetadataService- Throws:
org.exoplatform.social.common.ObjectAlreadyExistsException
-
createMetadataItem
public org.exoplatform.social.metadata.model.MetadataItem createMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, Map<String, String> properties, boolean broadcast) throws org.exoplatform.social.common.ObjectAlreadyExistsException- Specified by:
createMetadataItemin interfaceorg.exoplatform.social.metadata.MetadataService- Throws:
org.exoplatform.social.common.ObjectAlreadyExistsException
-
createMetadataItem
public org.exoplatform.social.metadata.model.MetadataItem createMetadataItem(org.exoplatform.social.metadata.model.MetadataObject metadataObject, org.exoplatform.social.metadata.model.MetadataKey metadataKey, Map<String, String> properties) throws org.exoplatform.social.common.ObjectAlreadyExistsException- Specified by:
createMetadataItemin interfaceorg.exoplatform.social.metadata.MetadataService- Throws:
org.exoplatform.social.common.ObjectAlreadyExistsException
-
updateMetadataItem
public org.exoplatform.social.metadata.model.MetadataItem updateMetadataItem(org.exoplatform.social.metadata.model.MetadataItem metadataItem, long userIdentityId, boolean broadcast) - Specified by:
updateMetadataItemin interfaceorg.exoplatform.social.metadata.MetadataService
-
updateMetadataItem
public org.exoplatform.social.metadata.model.MetadataItem updateMetadataItem(org.exoplatform.social.metadata.model.MetadataItem metadataItem, long userIdentityId) - Specified by:
updateMetadataItemin interfaceorg.exoplatform.social.metadata.MetadataService
-
deleteMetadataItem
public org.exoplatform.social.metadata.model.MetadataItem deleteMetadataItem(long itemId, boolean broadcast) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
deleteMetadataItemin interfaceorg.exoplatform.social.metadata.MetadataService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
deleteMetadataItem
public org.exoplatform.social.metadata.model.MetadataItem deleteMetadataItem(long itemId, long userIdentityId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
deleteMetadataItemin interfaceorg.exoplatform.social.metadata.MetadataService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
deleteMetadataItemsByObject
public void deleteMetadataItemsByObject(org.exoplatform.social.metadata.model.MetadataObject object) - Specified by:
deleteMetadataItemsByObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
deleteByMetadataTypeAndSpaceIdAndCreatorId
public void deleteByMetadataTypeAndSpaceIdAndCreatorId(String metadataTypeName, long spaceId, long userIdentityId) - Specified by:
deleteByMetadataTypeAndSpaceIdAndCreatorIdin interfaceorg.exoplatform.social.metadata.MetadataService
-
deleteByMetadataTypeAndCreatorId
- Specified by:
deleteByMetadataTypeAndCreatorIdin interfaceorg.exoplatform.social.metadata.MetadataService
-
deleteMetadataItemsByMetadataTypeAndObject
public void deleteMetadataItemsByMetadataTypeAndObject(String metadataType, org.exoplatform.social.metadata.model.MetadataObject object) - Specified by:
deleteMetadataItemsByMetadataTypeAndObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
deleteMetadataItemsByParentObject
public void deleteMetadataItemsByParentObject(org.exoplatform.social.metadata.model.MetadataObject object) - Specified by:
deleteMetadataItemsByParentObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
deleteByMetadataItemsTypeAndUntilCreationDate
- Specified by:
deleteByMetadataItemsTypeAndUntilCreationDatein interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByObject
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByObject(org.exoplatform.social.metadata.model.MetadataObject object) - Specified by:
getMetadataItemsByObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByMetadataTypeAndObject
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataTypeAndObject(String metadataType, org.exoplatform.social.metadata.model.MetadataObject object) - Specified by:
getMetadataItemsByMetadataTypeAndObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByMetadataNameAndTypeAndObject
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObject(String metadataName, String metadataTypeName, String objectType, long offset, long limit) - Specified by:
getMetadataItemsByMetadataNameAndTypeAndObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByMetadataNameAndTypeAndObject
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObject(String metadataName, String metadataTypeName, String objectType, String objectId, long offset, long limit) - Specified by:
getMetadataItemsByMetadataNameAndTypeAndObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceId
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceId(String metadataName, String metadataTypeName, String objectType, long spaceId, long offset, long limit) - Specified by:
getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceIdin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByMetadataNameAndTypeAndSpaceIds
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndSpaceIds(String metadataName, String metadataTypeName, List<Long> spaceIds, long offset, long limit) - Specified by:
getMetadataItemsByMetadataNameAndTypeAndSpaceIdsin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByFilter
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByFilter(org.exoplatform.social.metadata.MetadataFilter filter, long offset, long limit) - Specified by:
getMetadataItemsByFilterin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceIds
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceIds(String metadataName, String metadataTypeName, String objectType, List<Long> spaceIds, long offset, long limit) - Specified by:
getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceIdsin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByMetadataNameAndTypeAndObjectAndMetadataItemProperty
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObjectAndMetadataItemProperty(String metadataName, String metadataTypeName, String objectType, String propertyKey, String propertyValue, long offset, long limit) - Specified by:
getMetadataItemsByMetadataNameAndTypeAndObjectAndMetadataItemPropertyin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByMetadataTypeAndCreator
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataTypeAndCreator(String metadataTypeName, long creatorId, long offset, long limit) - Specified by:
getMetadataItemsByMetadataTypeAndCreatorin interfaceorg.exoplatform.social.metadata.MetadataService
-
countMetadataItemsByMetadataTypeAndCreator
- Specified by:
countMetadataItemsByMetadataTypeAndCreatorin interfaceorg.exoplatform.social.metadata.MetadataService
-
countMetadataItemsByMetadataTypeAndAudienceId
public Map<String,Long> countMetadataItemsByMetadataTypeAndAudienceId(String metadataTypeName, long creatorId, long spaceId) - Specified by:
countMetadataItemsByMetadataTypeAndAudienceIdin interfaceorg.exoplatform.social.metadata.MetadataService
-
countMetadataItemsByMetadataTypeAndSpacesIdAndCreatorId
public Map<Long,Long> countMetadataItemsByMetadataTypeAndSpacesIdAndCreatorId(String metadataTypeName, long creatorId, List<Long> spacesId) - Specified by:
countMetadataItemsByMetadataTypeAndSpacesIdAndCreatorIdin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataNamesByObject
public Set<String> getMetadataNamesByObject(org.exoplatform.social.metadata.model.MetadataObject object) - Specified by:
getMetadataNamesByObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataNamesByMetadataTypeAndObject
public List<String> getMetadataNamesByMetadataTypeAndObject(String metadataTypeName, String objectType, String objectId) - Specified by:
getMetadataNamesByMetadataTypeAndObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
findMetadataNamesByCreator
public List<String> findMetadataNamesByCreator(String term, String metadataTypeName, long creatorId, long limit) - Specified by:
findMetadataNamesByCreatorin interfaceorg.exoplatform.social.metadata.MetadataService
-
findMetadataNamesByUserAndQuery
public List<String> findMetadataNamesByUserAndQuery(String term, String metadataTypeName, Set<Long> audienceIds, long creatorId, long limit) - Specified by:
findMetadataNamesByUserAndQueryin interfaceorg.exoplatform.social.metadata.MetadataService
-
findMetadataNamesByAudiences
public List<String> findMetadataNamesByAudiences(String term, String metadataTypeName, Set<Long> audienceIds, long limit) - Specified by:
findMetadataNamesByAudiencesin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataItemsByMetadataAndObject
public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataAndObject(org.exoplatform.social.metadata.model.MetadataKey metadataKey, org.exoplatform.social.metadata.model.MetadataObject object) - Specified by:
getMetadataItemsByMetadataAndObjectin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataObjectIds
public List<String> getMetadataObjectIds(String metadataType, String metadataName, String objectType, long offset, long limit) - Specified by:
getMetadataObjectIdsin interfaceorg.exoplatform.social.metadata.MetadataService
-
addMetadataTypePlugin
public void addMetadataTypePlugin(org.exoplatform.social.metadata.MetadataTypePlugin metadataTypePlugin) - Specified by:
addMetadataTypePluginin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataTypePluginByName
- Specified by:
getMetadataTypePluginByNamein interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataTypeByName
- Specified by:
getMetadataTypeByNamein interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataTypes
- Specified by:
getMetadataTypesin interfaceorg.exoplatform.social.metadata.MetadataService
-
addMetadataPlugin
public void addMetadataPlugin(org.exoplatform.social.metadata.MetadataInitPlugin metadataInitPlugin) - Specified by:
addMetadataPluginin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadatas
public List<org.exoplatform.social.metadata.model.Metadata> getMetadatas(String metadataTypeName, long limit) - Specified by:
getMetadatasin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadatasByProperty
public List<org.exoplatform.social.metadata.model.Metadata> getMetadatasByProperty(String propertyKey, String propertyValue, long limit) - Specified by:
getMetadatasByPropertyin interfaceorg.exoplatform.social.metadata.MetadataService
-
countMetadataIdsByProperty
- Specified by:
countMetadataIdsByPropertyin interfaceorg.exoplatform.social.metadata.MetadataService
-
getMetadataIdsByProperty
public List<Long> getMetadataIdsByProperty(String propertyKey, String propertyValue, long offset, long limit) - Specified by:
getMetadataIdsByPropertyin interfaceorg.exoplatform.social.metadata.MetadataService
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-