Package org.jasig.portal.permission

Examples of org.jasig.portal.permission.IPermissionActivity


        for (final ExternalActivity externalActivity : externalPermissionOwner.getActivities()) {
            final String activityName = externalActivity.getName();
            final String activityFname = externalActivity.getFname();
            final String targetProvider = externalActivity.getTargetProvider();
           
            final IPermissionActivity permissionActivity = this.permissionOwnerDao.getOrCreatePermissionActivity(permissionOwner, activityName, activityFname, targetProvider);
           
            final String activityDesc = externalActivity.getDesc();
            permissionActivity.setDescription(activityDesc);
        }
       
        this.permissionOwnerDao.saveOwner(permissionOwner);
    }
View Full Code Here


             */
           
            String targetName = null;
            try {
                // attempt to get the target provider for this activity
                IPermissionActivity activity = permissionOwnerDao.getPermissionActivity(p.getOwner(), p.getActivity());
                entry.put("activityName", activity.getName());

                IPermissionOwner owner = permissionOwnerDao.getPermissionOwner(p.getOwner());
                entry.put("ownerName", owner.getName());

                String providerKey = activity.getTargetProviderKey();
                IPermissionTargetProvider provider = targetProviderRegistry.getTargetProvider(providerKey);
               
                // get the target from the provider
                IPermissionTarget target = provider.getTarget(p.getTarget());
                targetName = target.getName();
View Full Code Here

          // Owner
          IPermissionOwner owner = permissionOwnerDao.getPermissionOwner(permission.getOwner());
          Owner ownerImpl = new OwnerImpl(permission.getOwner(), owner.getName());
         
          // Activity
          IPermissionActivity activity = permissionOwnerDao.getPermissionActivity(permission.getOwner(), permission.getActivity());
          Activity activityImpl = new ActivityImpl(permission.getActivity(), activity.getName());
         
          // Principal
          Principal principalImpl = new PrincipalImpl(authP.getKey(), authP.getPrincipalString());
         
          // Target
          Target targetImpl = null// default
          IPermissionTargetProvider targetProvider = targetProviderRegistry.getTargetProvider(activity.getTargetProviderKey());
          IPermissionTarget target = targetProvider.getTarget(permission.getTarget());
          if (target != null) {
            targetImpl = new TargetImpl(permission.getTarget(), target.getName());
          }
View Full Code Here

        }
        if (!(obj instanceof IPermissionActivity)) {
            return false;
        }

        IPermissionActivity activity = (IPermissionActivity) obj;
        return this.fname.equals(activity.getFname());
    }
View Full Code Here

    @Override
    @PortalTransactional
    public IPermissionActivity getOrCreatePermissionActivity(
            IPermissionOwner owner, String name, String fname, String targetProviderKey) {
        IPermissionActivity activity = getPermissionActivity(owner.getId(), fname);
        if (activity == null) {
            activity = new PermissionActivityImpl(name, fname, targetProviderKey);
            owner.getActivities().add(activity);
        }
        return activity;
View Full Code Here

    public ModelAndView getTargets(@PathVariable("activity") Long activityId,
            @RequestParam("q") String query,
            HttpServletRequest req, HttpServletResponse response)
            throws Exception {
       
        IPermissionActivity activity = permissionOwnerDao.getPermissionActivity(activityId);
        IPermissionTargetProvider provider = targetProviderRegistry.getTargetProvider(activity.getTargetProviderKey());
       
        SortedSet<IPermissionTarget> matchingTargets = new TreeSet<IPermissionTarget>();
        // add matching results for this identifier provider to the set
        Collection<IPermissionTarget> targets = provider.searchTargets(query);
        for (IPermissionTarget target : targets) {
View Full Code Here

            IPermissionOwner owner = permissionOwnerDao.getPermissionOwner(permission.getOwner());
            if (owner != null) {
                perm.setOwnerName(owner.getName());
            }
           
            IPermissionActivity activity = permissionOwnerDao.getPermissionActivity(permission.getOwner(), permission.getActivity());
            if (activity != null) {
                perm.setActivityName(activity.getName());
           
                IPermissionTargetProvider targetProvider = targetProviderRegistry.getTargetProvider(activity.getTargetProviderKey());
                if (targetProvider != null) {
                    IPermissionTarget target = targetProvider.getTarget(permission.getIdentifier());
                    if (target != null) {
                        perm.setTargetName(target.getName());
                    }
View Full Code Here

                perm.setOwnerName(owner.getName());
            } else {
                perm.setOwnerName(permission.getOwner());
            }
           
            IPermissionActivity activity = permissionOwnerDao.getPermissionActivity(permission.getOwner(), permission.getActivity());
            if (activity != null) {
                perm.setActivityName(activity.getName());
            } else {
                perm.setActivityName(permission.getActivity());
            }
           
            JsonEntityBean principal = groupListHelper.getEntityForPrincipal(permission.getIdentifier());
View Full Code Here

TOP

Related Classes of org.jasig.portal.permission.IPermissionActivity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.