List of usage examples for com.liferay.portal.kernel.security.permission ActionKeys VIEW
String VIEW
To view the source code for com.liferay.portal.kernel.security.permission ActionKeys VIEW.
Click Source Link
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMFormInstanceVersionServiceImpl.java
License:Open Source License
@Override public DDMFormInstanceVersion getLatestFormInstanceVersion(long ddmFormInstanceId) throws PortalException { DDMFormInstancePermission.check(getPermissionChecker(), ddmFormInstanceId, ActionKeys.VIEW); return ddmFormInstanceVersionLocalService.getLatestFormInstanceVersion(ddmFormInstanceId); }
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMStructureServiceImpl.java
License:Open Source License
/** * Copies a structure, creating a new structure with all the values * extracted from the original one. The new structure supports a new name * and description./*from www .j a va 2 s . c o m*/ * * @param structureId the primary key of the structure to be copied * @param nameMap the new structure's locales and localized names * @param descriptionMap the new structure's locales and localized * descriptions * @param serviceContext the service context to be applied. Can set the * UUID, creation date, modification date, guest permissions, and * group permissions for the structure. * @return the new structure */ @Override public DDMStructure copyStructure(long structureId, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, ServiceContext serviceContext) throws PortalException { DDMStructure structure = ddmStructurePersistence.findByPrimaryKey(structureId); DDMStructurePermission.check(getPermissionChecker(), structure, ActionKeys.VIEW); DDMStructurePermission.checkAddStruturePermission(getPermissionChecker(), serviceContext.getScopeGroupId(), structure.getClassNameId()); return ddmStructureLocalService.copyStructure(getUserId(), structureId, nameMap, descriptionMap, serviceContext); }
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMStructureServiceImpl.java
License:Open Source License
@Override public DDMStructure copyStructure(long structureId, ServiceContext serviceContext) throws PortalException { DDMStructure structure = ddmStructurePersistence.findByPrimaryKey(structureId); DDMStructurePermission.check(getPermissionChecker(), structure, ActionKeys.VIEW); DDMStructurePermission.checkAddStruturePermission(getPermissionChecker(), serviceContext.getScopeGroupId(), structure.getClassNameId()); return ddmStructureLocalService.copyStructure(getUserId(), structureId, serviceContext); }
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMStructureServiceImpl.java
License:Open Source License
/** * Returns the structure matching the class name ID, structure key, and * group.//from w w w. ja v a2 s .c o m * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's * related model * @param structureKey the unique string identifying the structure * @return the matching structure, or <code>null</code> if a matching * structure could not be found */ @Override public DDMStructure fetchStructure(long groupId, long classNameId, String structureKey) throws PortalException { DDMStructure ddmStructure = ddmStructurePersistence.fetchByG_C_S(groupId, classNameId, structureKey); if (ddmStructure != null) { DDMStructurePermission.check(getPermissionChecker(), ddmStructure, ActionKeys.VIEW); } return ddmStructure; }
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMStructureServiceImpl.java
License:Open Source License
@Override public DDMStructure fetchStructure(long groupId, long classNameId, String structureKey, boolean includeAncestorStructures) throws PortalException { DDMStructure ddmStructure = ddmStructureLocalService.fetchStructure(groupId, classNameId, structureKey, includeAncestorStructures);//from w w w. j a v a 2s . co m if (ddmStructure != null) { DDMStructurePermission.check(getPermissionChecker(), ddmStructure, ActionKeys.VIEW); } return ddmStructure; }
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMStructureServiceImpl.java
License:Open Source License
/** * Returns the structure with the ID.//from w ww. j a v a2 s . c om * * @param structureId the primary key of the structure * @return the structure with the ID */ @Override public DDMStructure getStructure(long structureId) throws PortalException { DDMStructurePermission.check(getPermissionChecker(), structureId, ActionKeys.VIEW); return ddmStructurePersistence.findByPrimaryKey(structureId); }
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMStructureServiceImpl.java
License:Open Source License
/** * Returns the structure matching the class name ID, structure key, and * group./*from w w w. j a va2s. co m*/ * * @param groupId the primary key of the structure's group * @param classNameId the primary key of the class name for the structure's * related model * @param structureKey the unique string identifying the structure * @return the matching structure */ @Override public DDMStructure getStructure(long groupId, long classNameId, String structureKey) throws PortalException { DDMStructurePermission.check(getPermissionChecker(), groupId, classNameId, structureKey, ActionKeys.VIEW); return ddmStructureLocalService.getStructure(groupId, classNameId, structureKey); }
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMStructureServiceImpl.java
License:Open Source License
/** * Returns the structure matching the class name ID, structure key, and * group, optionally searching ancestor sites (that have sharing enabled) * and global scoped sites.//from w ww. java 2s.c om * * <p> * This method first searches in the group. If the structure is still not * found and <code>includeAncestorStructures</code> is set to * <code>true</code>, this method searches the group's ancestor sites (that * have sharing enabled) and lastly searches global scoped sites. * </p> * * @param groupId the primary key of the structure's group * @param classNameId the primary key of the class name for the structure's * related model * @param structureKey the unique string identifying the structure * @param includeAncestorStructures whether to include ancestor sites (that * have sharing enabled) and include global scoped sites in the * search * @return the matching structure */ @Override public DDMStructure getStructure(long groupId, long classNameId, String structureKey, boolean includeAncestorStructures) throws PortalException { DDMStructurePermission.check(getPermissionChecker(), groupId, classNameId, structureKey, ActionKeys.VIEW); return ddmStructureLocalService.getStructure(groupId, classNameId, structureKey, includeAncestorStructures); }
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMStructureVersionServiceImpl.java
License:Open Source License
@Override public DDMStructureVersion getLatestStructureVersion(long structureId) throws PortalException { DDMStructurePermission.check(getPermissionChecker(), structureId, ActionKeys.VIEW); return ddmStructureVersionLocalService.getLatestStructureVersion(structureId); }
From source file:com.liferay.dynamic.data.mapping.service.impl.DDMStructureVersionServiceImpl.java
License:Open Source License
@Override public DDMStructureVersion getStructureVersion(long structureVersionId) throws PortalException { DDMStructureVersion structureVersion = ddmStructureVersionLocalService .getStructureVersion(structureVersionId); DDMStructurePermission.check(getPermissionChecker(), structureVersion.getStructureId(), ActionKeys.VIEW); return structureVersion; }