001
014
015 package com.liferay.portal.service.impl;
016
017 import com.liferay.portal.ResourceActionsException;
018 import com.liferay.portal.kernel.bean.BeanPropertiesUtil;
019 import com.liferay.portal.kernel.exception.PortalException;
020 import com.liferay.portal.kernel.exception.SystemException;
021 import com.liferay.portal.kernel.log.Log;
022 import com.liferay.portal.kernel.log.LogFactoryUtil;
023 import com.liferay.portal.kernel.search.SearchEngineUtil;
024 import com.liferay.portal.kernel.util.ListUtil;
025 import com.liferay.portal.model.AuditedModel;
026 import com.liferay.portal.model.GroupedModel;
027 import com.liferay.portal.model.PermissionedModel;
028 import com.liferay.portal.model.Resource;
029 import com.liferay.portal.model.ResourceConstants;
030 import com.liferay.portal.model.ResourcePermission;
031 import com.liferay.portal.model.Role;
032 import com.liferay.portal.model.RoleConstants;
033 import com.liferay.portal.model.impl.ResourceImpl;
034 import com.liferay.portal.security.permission.PermissionCacheUtil;
035 import com.liferay.portal.security.permission.PermissionThreadLocal;
036 import com.liferay.portal.security.permission.ResourceActionsUtil;
037 import com.liferay.portal.service.ServiceContext;
038 import com.liferay.portal.service.base.ResourceLocalServiceBaseImpl;
039 import com.liferay.portal.util.ResourcePermissionsThreadLocal;
040
041 import java.util.Arrays;
042 import java.util.Iterator;
043 import java.util.List;
044
045 import org.apache.commons.lang.time.StopWatch;
046
047
099 public class ResourceLocalServiceImpl extends ResourceLocalServiceBaseImpl {
100
101
146 @Override
147 public void addModelResources(
148 AuditedModel auditedModel, ServiceContext serviceContext)
149 throws PortalException, SystemException {
150
151 if (serviceContext.isAddGroupPermissions() ||
152 serviceContext.isAddGuestPermissions()) {
153
154 addResources(
155 auditedModel.getCompanyId(), getGroupId(auditedModel),
156 auditedModel.getUserId(), auditedModel.getModelClassName(),
157 String.valueOf(auditedModel.getPrimaryKeyObj()), false,
158 serviceContext.isAddGroupPermissions(),
159 serviceContext.isAddGuestPermissions(),
160 getPermissionedModel(auditedModel));
161 }
162 else {
163 if (serviceContext.isDeriveDefaultPermissions()) {
164 serviceContext.deriveDefaultPermissions(
165 getGroupId(auditedModel), auditedModel.getModelClassName());
166 }
167
168 addModelResources(
169 auditedModel.getCompanyId(), getGroupId(auditedModel),
170 auditedModel.getUserId(), auditedModel.getModelClassName(),
171 String.valueOf(auditedModel.getPrimaryKeyObj()),
172 serviceContext.getGroupPermissions(),
173 serviceContext.getGuestPermissions(),
174 getPermissionedModel(auditedModel));
175 }
176 }
177
178
196 @Override
197 public void addModelResources(
198 long companyId, long groupId, long userId, String name,
199 long primKey, String[] groupPermissions, String[] guestPermissions)
200 throws PortalException, SystemException {
201
202 addModelResources(
203 companyId, groupId, userId, name, String.valueOf(primKey),
204 groupPermissions, guestPermissions, null);
205 }
206
207
225 @Override
226 public void addModelResources(
227 long companyId, long groupId, long userId, String name,
228 String primKey, String[] groupPermissions,
229 String[] guestPermissions)
230 throws PortalException, SystemException {
231
232 addModelResources(
233 companyId, groupId, userId, name, primKey, groupPermissions,
234 guestPermissions, null);
235 }
236
237
258 @Override
259 public void addResources(
260 long companyId, long groupId, long userId, String name,
261 long primKey, boolean portletActions, boolean addGroupPermissions,
262 boolean addGuestPermissions)
263 throws PortalException, SystemException {
264
265 addResources(
266 companyId, groupId, userId, name, String.valueOf(primKey),
267 portletActions, addGroupPermissions, addGuestPermissions, null);
268 }
269
270
291 @Override
292 public void addResources(
293 long companyId, long groupId, long userId, String name,
294 String primKey, boolean portletActions, boolean addGroupPermissions,
295 boolean addGuestPermissions)
296 throws PortalException, SystemException {
297
298 addResources(
299 companyId, groupId, userId, name, primKey, portletActions,
300 addGroupPermissions, addGuestPermissions, null);
301 }
302
303
317 @Override
318 public void addResources(
319 long companyId, long groupId, String name, boolean portletActions)
320 throws PortalException, SystemException {
321
322 addResources(
323 companyId, groupId, 0, name, null, portletActions, false, false);
324 }
325
326
335 @Override
336 public void deleteResource(AuditedModel auditedModel, int scope)
337 throws PortalException, SystemException {
338
339 deleteResource(
340 auditedModel.getCompanyId(), auditedModel.getModelClassName(),
341 scope, String.valueOf(auditedModel.getPrimaryKeyObj()),
342 getPermissionedModel(auditedModel));
343 }
344
345
357 @Override
358 public void deleteResource(
359 long companyId, String name, int scope, long primKey)
360 throws PortalException, SystemException {
361
362 deleteResource(companyId, name, scope, String.valueOf(primKey), null);
363 }
364
365
377 @Override
378 public void deleteResource(
379 long companyId, String name, int scope, String primKey)
380 throws PortalException, SystemException {
381
382 deleteResource(companyId, name, scope, primKey, null);
383 }
384
385
396 @Override
397 public Resource getResource(
398 long companyId, String name, int scope, String primKey) {
399
400 Resource resource = new ResourceImpl();
401
402 resource.setCompanyId(companyId);
403 resource.setName(name);
404 resource.setScope(scope);
405 resource.setPrimKey(primKey);
406
407 return resource;
408 }
409
410
430 @Override
431 public boolean hasUserPermissions(
432 long userId, long resourceId, List<Resource> resources,
433 String actionId, long[] roleIds)
434 throws PortalException, SystemException {
435
436 StopWatch stopWatch = null;
437
438 if (_log.isDebugEnabled()) {
439 stopWatch = new StopWatch();
440
441 stopWatch.start();
442 }
443
444 int block = 1;
445
446 boolean hasUserPermissions =
447 resourcePermissionLocalService.hasResourcePermission(
448 resources, roleIds, actionId);
449
450 logHasUserPermissions(userId, resourceId, actionId, stopWatch, block++);
451
452 return hasUserPermissions;
453 }
454
455
465 @Override
466 public void updateModelResources(
467 AuditedModel auditedModel, ServiceContext serviceContext)
468 throws PortalException, SystemException {
469
470 updateResources(
471 auditedModel.getCompanyId(), getGroupId(auditedModel),
472 auditedModel.getModelClassName(),
473 String.valueOf(auditedModel.getPrimaryKeyObj()),
474 serviceContext.getGroupPermissions(),
475 serviceContext.getGuestPermissions(),
476 getPermissionedModel(auditedModel));
477 }
478
479
493 @Override
494 public void updateResources(
495 long companyId, long groupId, String name, long primKey,
496 String[] groupPermissions, String[] guestPermissions)
497 throws PortalException, SystemException {
498
499 updateResources(
500 companyId, groupId, name, String.valueOf(primKey), groupPermissions,
501 guestPermissions, null);
502 }
503
504
518 @Override
519 public void updateResources(
520 long companyId, long groupId, String name, String primKey,
521 String[] groupPermissions, String[] guestPermissions)
522 throws PortalException, SystemException {
523
524 updateResources(
525 companyId, groupId, name, primKey, groupPermissions,
526 guestPermissions, null);
527 }
528
529
543 @Override
544 public void updateResources(
545 long companyId, String name, int scope, String primKey,
546 String newPrimKey)
547 throws SystemException {
548
549 if (resourceBlockLocalService.isSupported(name)) {
550
551
552
553
554
555 }
556 else {
557 updateResourcePermissions(
558 companyId, name, scope, primKey, newPrimKey);
559 }
560 }
561
562 protected void addGroupPermissions(
563 long companyId, long groupId, long userId, String name,
564 Resource resource, boolean portletActions,
565 PermissionedModel permissionedModel)
566 throws PortalException, SystemException {
567
568 List<String> actions = null;
569
570 if (portletActions) {
571 actions = ResourceActionsUtil.getPortletResourceGroupDefaultActions(
572 name);
573 }
574 else {
575 actions = ResourceActionsUtil.getModelResourceGroupDefaultActions(
576 name);
577 }
578
579 String[] actionIds = actions.toArray(new String[actions.size()]);
580
581 if (resourceBlockLocalService.isSupported(name)) {
582 addGroupPermissionsBlocks(
583 groupId, resource, actions, permissionedModel);
584 }
585 else {
586 addGroupPermissions(groupId, resource, actionIds);
587 }
588 }
589
590 protected void addGroupPermissions(
591 long groupId, Resource resource, String[] actionIds)
592 throws PortalException, SystemException {
593
594 Role role = roleLocalService.getDefaultGroupRole(groupId);
595
596 resourcePermissionLocalService.setResourcePermissions(
597 resource.getCompanyId(), resource.getName(), resource.getScope(),
598 resource.getPrimKey(), role.getRoleId(), actionIds);
599 }
600
601 protected void addGroupPermissionsBlocks(
602 long groupId, Resource resource, List<String> actionIds,
603 PermissionedModel permissionedModel)
604 throws PortalException, SystemException {
605
606 if (permissionedModel == null) {
607 throw new IllegalArgumentException("Permissioned model is null");
608 }
609
610
611
612 Role role = roleLocalService.getDefaultGroupRole(groupId);
613
614 resourceBlockLocalService.setIndividualScopePermissions(
615 resource.getCompanyId(), groupId, resource.getName(),
616 permissionedModel, role.getRoleId(), actionIds);
617 }
618
619 protected void addGuestPermissions(
620 long companyId, long groupId, long userId, String name,
621 Resource resource, boolean portletActions,
622 PermissionedModel permissionedModel)
623 throws PortalException, SystemException {
624
625 List<String> actions = null;
626
627 if (portletActions) {
628 actions = ResourceActionsUtil.getPortletResourceGuestDefaultActions(
629 name);
630 }
631 else {
632 actions = ResourceActionsUtil.getModelResourceGuestDefaultActions(
633 name);
634 }
635
636 String[] actionIds = actions.toArray(new String[actions.size()]);
637
638 if (resourceBlockLocalService.isSupported(name)) {
639 addGuestPermissionsBlocks(
640 companyId, groupId, resource, actions, permissionedModel);
641 }
642 else {
643 addGuestPermissions(companyId, resource, actionIds);
644 }
645 }
646
647 protected void addGuestPermissions(
648 long companyId, Resource resource, String[] actionIds)
649 throws PortalException, SystemException {
650
651 Role guestRole = roleLocalService.getRole(
652 companyId, RoleConstants.GUEST);
653
654 resourcePermissionLocalService.setResourcePermissions(
655 resource.getCompanyId(), resource.getName(), resource.getScope(),
656 resource.getPrimKey(), guestRole.getRoleId(), actionIds);
657 }
658
659 protected void addGuestPermissionsBlocks(
660 long companyId, long groupId, Resource resource,
661 List<String> actionIds, PermissionedModel permissionedModel)
662 throws PortalException, SystemException {
663
664 if (permissionedModel == null) {
665 throw new IllegalArgumentException("Permissioned model is null");
666 }
667
668
669
670 Role guestRole = roleLocalService.getRole(
671 companyId, RoleConstants.GUEST);
672
673 resourceBlockLocalService.setIndividualScopePermissions(
674 resource.getCompanyId(), groupId, resource.getName(),
675 permissionedModel, guestRole.getRoleId(), actionIds);
676 }
677
678 protected void addModelResources(
679 long companyId, long groupId, long userId, Resource resource,
680 String[] groupPermissions, String[] guestPermissions,
681 PermissionedModel permissionedModel)
682 throws PortalException, SystemException {
683
684
685
686 Role ownerRole = roleLocalService.getRole(
687 companyId, RoleConstants.OWNER);
688
689 List<String> ownerActionIds =
690 ResourceActionsUtil.getModelResourceActions(resource.getName());
691
692 ownerActionIds = ListUtil.copy(ownerActionIds);
693
694 filterOwnerActions(resource.getName(), ownerActionIds);
695
696 String[] ownerPermissions = ownerActionIds.toArray(
697 new String[ownerActionIds.size()]);
698
699
700
701 Role defaultGroupRole = null;
702
703 if (groupId > 0) {
704 defaultGroupRole = roleLocalService.getDefaultGroupRole(groupId);
705
706 if (groupPermissions == null) {
707 groupPermissions = new String[0];
708 }
709 }
710
711
712
713 Role guestRole = roleLocalService.getRole(
714 companyId, RoleConstants.GUEST);
715
716 if (guestPermissions == null) {
717 guestPermissions = new String[0];
718 }
719
720 if (resourceBlockLocalService.isSupported(resource.getName())) {
721 if (permissionedModel == null) {
722 throw new IllegalArgumentException(
723 "Permissioned model is null");
724 }
725
726
727
728 resourceBlockLocalService.setIndividualScopePermissions(
729 resource.getCompanyId(), groupId, resource.getName(),
730 permissionedModel, ownerRole.getRoleId(), ownerActionIds);
731
732 if (groupId > 0) {
733 resourceBlockLocalService.setIndividualScopePermissions(
734 resource.getCompanyId(), groupId, resource.getName(),
735 permissionedModel, defaultGroupRole.getRoleId(),
736 Arrays.asList(groupPermissions));
737 }
738
739 resourceBlockLocalService.setIndividualScopePermissions(
740 resource.getCompanyId(), groupId, resource.getName(),
741 permissionedModel, guestRole.getRoleId(),
742 Arrays.asList(guestPermissions));
743 }
744 else {
745 resourcePermissionLocalService.setOwnerResourcePermissions(
746 resource.getCompanyId(), resource.getName(),
747 resource.getScope(), resource.getPrimKey(),
748 ownerRole.getRoleId(), userId, ownerPermissions);
749
750 if (groupId > 0) {
751 resourcePermissionLocalService.setResourcePermissions(
752 resource.getCompanyId(), resource.getName(),
753 resource.getScope(), resource.getPrimKey(),
754 defaultGroupRole.getRoleId(), groupPermissions);
755 }
756
757 resourcePermissionLocalService.setResourcePermissions(
758 resource.getCompanyId(), resource.getName(),
759 resource.getScope(), resource.getPrimKey(),
760 guestRole.getRoleId(), guestPermissions);
761 }
762 }
763
764 protected void addModelResources(
765 long companyId, long groupId, long userId, String name,
766 String primKey, String[] groupPermissions,
767 String[] guestPermissions, PermissionedModel permissionedModel)
768 throws PortalException, SystemException {
769
770 if (!PermissionThreadLocal.isAddResource()) {
771 return;
772 }
773
774 validate(name, false);
775
776 if (primKey == null) {
777 return;
778 }
779
780
781
782 Resource resource = getResource(
783 companyId, name, ResourceConstants.SCOPE_INDIVIDUAL, primKey);
784
785
786
787 boolean flushEnabled = PermissionThreadLocal.isFlushEnabled();
788
789 PermissionThreadLocal.setIndexEnabled(false);
790
791 try {
792 addModelResources(
793 companyId, groupId, userId, resource, groupPermissions,
794 guestPermissions, permissionedModel);
795 }
796 finally {
797 PermissionThreadLocal.setIndexEnabled(flushEnabled);
798
799 PermissionCacheUtil.clearCache();
800
801 SearchEngineUtil.updatePermissionFields(name, primKey);
802 }
803 }
804
805 protected void addResources(
806 long companyId, long groupId, long userId, Resource resource,
807 boolean portletActions, PermissionedModel permissionedModel)
808 throws PortalException, SystemException {
809
810 List<String> actionIds = null;
811
812 if (portletActions) {
813 actionIds = ResourceActionsUtil.getPortletResourceActions(
814 resource.getName());
815 }
816 else {
817 actionIds = ResourceActionsUtil.getModelResourceActions(
818 resource.getName());
819
820 actionIds = ListUtil.copy(actionIds);
821
822 filterOwnerActions(resource.getName(), actionIds);
823 }
824
825 Role role = roleLocalService.getRole(companyId, RoleConstants.OWNER);
826
827 if (resourceBlockLocalService.isSupported(resource.getName())) {
828 if (permissionedModel == null) {
829 throw new IllegalArgumentException(
830 "Permissioned model is null");
831 }
832
833
834
835 resourceBlockLocalService.setIndividualScopePermissions(
836 resource.getCompanyId(), groupId, resource.getName(),
837 permissionedModel, role.getRoleId(), actionIds);
838 }
839 else {
840 resourcePermissionLocalService.setOwnerResourcePermissions(
841 resource.getCompanyId(), resource.getName(),
842 resource.getScope(), resource.getPrimKey(), role.getRoleId(),
843 userId, actionIds.toArray(new String[actionIds.size()]));
844 }
845 }
846
847 protected void addResources(
848 long companyId, long groupId, long userId, String name,
849 String primKey, boolean portletActions, boolean addGroupPermissions,
850 boolean addGuestPermissions, PermissionedModel permissionedModel)
851 throws PortalException, SystemException {
852
853 if (!PermissionThreadLocal.isAddResource()) {
854 return;
855 }
856
857 validate(name, portletActions);
858
859 if (primKey == null) {
860 return;
861 }
862
863
864
865 Resource resource = getResource(
866 companyId, name, ResourceConstants.SCOPE_INDIVIDUAL, primKey);
867
868
869
870 boolean flushEnabled = PermissionThreadLocal.isFlushEnabled();
871
872 PermissionThreadLocal.setIndexEnabled(false);
873
874 List<ResourcePermission> resourcePermissions =
875 resourcePermissionPersistence.findByC_N_S_P(
876 companyId, name, ResourceConstants.SCOPE_INDIVIDUAL, primKey);
877
878 ResourcePermissionsThreadLocal.setResourcePermissions(
879 resourcePermissions);
880
881 try {
882 addResources(
883 companyId, groupId, userId, resource, portletActions,
884 permissionedModel);
885
886
887
888 if ((groupId > 0) && addGroupPermissions) {
889 addGroupPermissions(
890 companyId, groupId, userId, name, resource, portletActions,
891 permissionedModel);
892 }
893
894
895
896 if (addGuestPermissions) {
897
898
899
900
901 addGuestPermissions(
902 companyId, groupId, userId, name, resource, portletActions,
903 permissionedModel);
904 }
905 }
906 finally {
907 ResourcePermissionsThreadLocal.setResourcePermissions(null);
908
909 PermissionThreadLocal.setIndexEnabled(flushEnabled);
910
911 PermissionCacheUtil.clearCache();
912
913 SearchEngineUtil.updatePermissionFields(name, primKey);
914 }
915 }
916
917 protected void deleteResource(
918 long companyId, String name, int scope, String primKey,
919 PermissionedModel permissionedModel)
920 throws PortalException, SystemException {
921
922 if (resourceBlockLocalService.isSupported(name)) {
923 if (permissionedModel == null) {
924 throw new IllegalArgumentException(
925 "Permissioned model is null");
926 }
927
928 resourceBlockLocalService.releasePermissionedModelResourceBlock(
929 permissionedModel);
930
931 return;
932 }
933
934 resourcePermissionLocalService.deleteResourcePermissions(
935 companyId, name, scope, primKey);
936 }
937
938 protected void filterOwnerActions(String name, List<String> actionIds) {
939 List<String> defaultOwnerActions =
940 ResourceActionsUtil.getModelResourceOwnerDefaultActions(name);
941
942 if (defaultOwnerActions.isEmpty()) {
943 return;
944 }
945
946 Iterator<String> itr = actionIds.iterator();
947
948 while (itr.hasNext()) {
949 String actionId = itr.next();
950
951 if (!defaultOwnerActions.contains(actionId)) {
952 itr.remove();
953 }
954 }
955 }
956
957 protected long getGroupId(AuditedModel auditedModel) {
958 long groupId = 0;
959
960 if (auditedModel instanceof GroupedModel) {
961 GroupedModel groupedModel = (GroupedModel)auditedModel;
962
963 groupId = BeanPropertiesUtil.getLongSilent(
964 groupedModel, "resourceGroupId", groupedModel.getGroupId());
965 }
966
967 return groupId;
968 }
969
970 protected PermissionedModel getPermissionedModel(
971 AuditedModel auditedModel) {
972
973 PermissionedModel permissionedModel = null;
974
975 if (auditedModel instanceof PermissionedModel) {
976 permissionedModel = (PermissionedModel)auditedModel;
977 }
978
979 return permissionedModel;
980 }
981
982 protected void logHasUserPermissions(
983 long userId, long resourceId, String actionId, StopWatch stopWatch,
984 int block) {
985
986 if (!_log.isDebugEnabled()) {
987 return;
988 }
989
990 _log.debug(
991 "Checking user permissions block " + block + " for " + userId +
992 " " + resourceId + " " + actionId + " takes " +
993 stopWatch.getTime() + " ms");
994 }
995
996 protected void updateResourceBlocks(
997 long companyId, long groupId, Resource resource,
998 String[] groupPermissions, String[] guestPermissions,
999 PermissionedModel permissionedModel)
1000 throws PortalException, SystemException {
1001
1002 if (permissionedModel == null) {
1003 throw new IllegalArgumentException("Permissioned model is null");
1004 }
1005
1006
1007
1008 Role role = roleLocalService.getDefaultGroupRole(groupId);
1009
1010 resourceBlockLocalService.setIndividualScopePermissions(
1011 companyId, groupId, resource.getName(), permissionedModel,
1012 role.getRoleId(), Arrays.asList(groupPermissions));
1013
1014 role = roleLocalService.getRole(companyId, RoleConstants.GUEST);
1015
1016 resourceBlockLocalService.setIndividualScopePermissions(
1017 companyId, groupId, resource.getName(), permissionedModel,
1018 role.getRoleId(), Arrays.asList(guestPermissions));
1019 }
1020
1021 protected void updateResourcePermissions(
1022 long companyId, long groupId, Resource resource,
1023 String[] groupPermissions, String[] guestPermissions)
1024 throws PortalException, SystemException {
1025
1026 Role role = roleLocalService.getDefaultGroupRole(groupId);
1027
1028 resourcePermissionLocalService.setResourcePermissions(
1029 resource.getCompanyId(), resource.getName(), resource.getScope(),
1030 resource.getPrimKey(), role.getRoleId(), groupPermissions);
1031
1032 role = roleLocalService.getRole(companyId, RoleConstants.GUEST);
1033
1034 resourcePermissionLocalService.setResourcePermissions(
1035 resource.getCompanyId(), resource.getName(), resource.getScope(),
1036 resource.getPrimKey(), role.getRoleId(), guestPermissions);
1037 }
1038
1039 protected void updateResourcePermissions(
1040 long companyId, String name, int scope, String primKey,
1041 String newPrimKey)
1042 throws SystemException {
1043
1044 List<ResourcePermission> resourcePermissions =
1045 resourcePermissionLocalService.getResourcePermissions(
1046 companyId, name, scope, primKey);
1047
1048 for (ResourcePermission resourcePermission : resourcePermissions) {
1049 resourcePermission.setPrimKey(newPrimKey);
1050
1051 resourcePermissionPersistence.update(resourcePermission);
1052 }
1053 }
1054
1055 protected void updateResources(
1056 long companyId, long groupId, String name, String primKey,
1057 String[] groupPermissions, String[] guestPermissions,
1058 PermissionedModel permissionedModel)
1059 throws PortalException, SystemException {
1060
1061 Resource resource = getResource(
1062 companyId, name, ResourceConstants.SCOPE_INDIVIDUAL, primKey);
1063
1064 if (groupPermissions == null) {
1065 groupPermissions = new String[0];
1066 }
1067
1068 if (guestPermissions == null) {
1069 guestPermissions = new String[0];
1070 }
1071
1072 if (resourceBlockLocalService.isSupported(name)) {
1073 updateResourceBlocks(
1074 companyId, groupId, resource, groupPermissions,
1075 guestPermissions, permissionedModel);
1076 }
1077 else {
1078 updateResourcePermissions(
1079 companyId, groupId, resource, groupPermissions,
1080 guestPermissions);
1081 }
1082 }
1083
1084 protected void validate(String name, boolean portletActions)
1085 throws PortalException {
1086
1087 List<String> actions = null;
1088
1089 if (portletActions) {
1090 actions = ResourceActionsUtil.getPortletResourceActions(name);
1091 }
1092 else {
1093 actions = ResourceActionsUtil.getModelResourceActions(name);
1094 }
1095
1096 if (actions.size() == 0) {
1097 throw new ResourceActionsException(
1098 "There are no actions associated with the resource " + name);
1099 }
1100 }
1101
1102 private static Log _log = LogFactoryUtil.getLog(
1103 ResourceLocalServiceImpl.class);
1104
1105 }