Package nexj.core.meta

Examples of nexj.core.meta.PrimitivePrivilege


      {
         for (Lookup.Iterator itr = m_typeCodeMap.iterator(); itr.hasNext();)
         {
            itr.next();
           
            PrimitivePrivilege privilege = ((Metaclass)itr.getValue()).getReadPrivilege();
           
            if (privilege != null && !privilegeSet.contains(privilege))
            {
               return true;
            }
View Full Code Here


            while (m_nNext < m_table.length)
            {
               if (m_table[m_nNext] != null && m_table[m_nNext] != EMPTY)
               {
                  PrimitivePrivilege privilege = ((Metaclass)m_table[m_nNext + 1]).getReadPrivilege();

                  if (privilege == null || m_privilegeSet.contains(privilege))
                  {
                     return true;
                  }
View Full Code Here

    * @param context The invocation context.
    * @throws SecurityViolationException if the user does not have the privilege.
    */
   public static void checkPrivilege(InvocationContext context) throws SecurityViolationException
   {
      PrimitivePrivilege privilege = context.getMetadata().getGenericRPCPrivilege();

      if (privilege != null && !context.getPrivilegeSet().contains(privilege))
      {
         throw new SecurityViolationException("err.rpc.privilege",
            new Object[]{context.getPrincipal().getName(), privilege.getName()});
      }
   }
View Full Code Here

            XMLUtil.forEachChildElement(privilegesElement, "Privilege",
               m_helper.new ElementHandler("privilege")
            {
               public void handleElement(Element privilegeElement, String sPrivilegeName)
               {
                  Privilege privilege = new PrimitivePrivilege(sPrivilegeName);

                  m_metadata.addPrivilege(privilege);
                  privilege.setCaption(XMLUtil.getStringAttr(privilegeElement,
                     "caption", privilege.getCaption()));
               }
            });
         }
      });
View Full Code Here

            {
               throw new TypeMismatchException(getSymbol());
            }

            InvocationContext context = (InvocationContext)machine.getContext();
            PrimitivePrivilege privilege = context.getMetadata().getPrimitivePrivilege((String)name);

            machine.returnValue(Boolean.valueOf(context.getPrivilegeSet().contains(privilege)), nArgCount);

            return false;
         }
View Full Code Here

TOP

Related Classes of nexj.core.meta.PrimitivePrivilege

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.