Package org.jasig.portal.permission

Examples of org.jasig.portal.permission.IPermissionOwner


    @Override
    @Transactional
    public void importData(ExternalPermissionOwner externalPermissionOwner) {
        final String name = externalPermissionOwner.getName();
        final String fname = externalPermissionOwner.getFname();
        final IPermissionOwner permissionOwner = this.permissionOwnerDao.getOrCreatePermissionOwner(name, fname);
       
        final String desc = externalPermissionOwner.getDesc();
        permissionOwner.setDescription(desc);
       
        for (final ExternalActivity externalActivity : externalPermissionOwner.getActivities()) {
            final String activityName = externalActivity.getName();
            final String activityFname = externalActivity.getFname();
            final String targetProvider = externalActivity.getTargetProvider();
View Full Code Here


  /* (non-Javadoc)
   * @see org.jasig.portal.io.xml.IDataExporter#exportData(java.lang.String)
   */
  @Override
  public ExternalPermissionOwner exportData(String fname) {
      final IPermissionOwner permissionOwner = this.permissionOwnerDao.getPermissionOwner(fname);
      return convert(permissionOwner);
  }
View Full Code Here

            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
View Full Code Here

    Assignment rslt = null;
       
    try {
     
          // 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());
         
View Full Code Here

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

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

    }

    @Override
    @PortalTransactional
    public IPermissionOwner getOrCreatePermissionOwner(String name, String fname) {
        IPermissionOwner owner = getPermissionOwner(fname);
        if (owner == null) {
            owner = new PermissionOwnerImpl(name, fname);
            this.getEntityManager().persist(owner);
        }
        return owner;
View Full Code Here

        return getEntityManager().find(PermissionActivityImpl.class, id);
    }

    @Override
    public IPermissionActivity getPermissionActivity(long ownerId, String activityFname) {
        final IPermissionOwner permissionOwner = this.getPermissionOwner(ownerId);
        return findActivity(permissionOwner, activityFname);
    }
View Full Code Here

        return findActivity(permissionOwner, activityFname);
    }

    @Override
    public IPermissionActivity getPermissionActivity(String ownerFname, String activityFname) {
        final IPermissionOwner permissionOwner = this.getPermissionOwner(ownerFname);
        return findActivity(permissionOwner, activityFname);
    }
View Full Code Here

    public ModelAndView getOwners(
            @PathVariable("owner") String ownerParam,
            HttpServletRequest req, HttpServletResponse response)
            throws Exception {
       
        IPermissionOwner owner = null;
       
        if (StringUtils.isNumeric(ownerParam)) {
            Long id = Long.valueOf(ownerParam);
            owner = permissionOwnerDao.getPermissionOwner(id);
        } else {
View Full Code Here

        perm.setPrincipalName(entity.getName());
        perm.setInherited(permission.isInherited());
       
        try {

            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());
View Full Code Here

TOP

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

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.