Examples of Aspect


Examples of org.dspace.app.xmlui.configuration.Aspect

        // Note: because we add a zero initial aspect our aspectIDs are one
        // off from the aspect chain's.
        if (chain.size() + 1> aspectID)
        {
            // Chain the next Aspect
            Aspect aspect = chain.get(aspectID - 1);

            Map<String, String> result = new HashMap<String, String>();
            result.put("aspectID", String.valueOf(aspectID));
            result.put("aspect", aspect.getPath());
            result.put("aspectName", aspect.getName());
            result.put("prefix", aspectID + "/");
            return result;
        }
        else
        {
View Full Code Here

Examples of org.dspace.app.xmlui.configuration.Aspect

        // Note: because we add a zero initial aspect our aspectIDs are one
        // off from the aspect chain's.
        if (chain.size() + 1> aspectID)
        {
            // Chain the next Aspect
            Aspect aspect = chain.get(aspectID - 1);

            Map<String, String> result = new HashMap<String, String>();
            result.put("aspectID", String.valueOf(aspectID));
            result.put("aspect", aspect.getPath());
            result.put("aspectName", aspect.getName());
            result.put("prefix", aspectID + "/");
            return result;
        }
        else
        {
View Full Code Here

Examples of org.jboss.aop.microcontainer.beans.Aspect

     
      Class<?> clazz = loader.loadClass(TestAspect.class.getName());
      assertNotSame(TestAspect.class, clazz);
      assertSame(loader, clazz.getClassLoader());
     
      Aspect aspect = assertInstanceOf(getBean("Aspect"), Aspect.class, false);    
      AspectDefinition def = aspect.getDefinition();
      AspectFactory factory = def.getFactory();
     
      Object global = factory.createPerVM();
      assertSame(getClass().getClassLoader(), global.getClass().getClassLoader());
View Full Code Here

Examples of org.wso2.carbon.registry.core.Aspect

    }

    // common method to build an aspect
    private static Aspect buildAspect(OMElement aspect, String name) throws RegistryException {
        String clazz = aspect.getAttributeValue(new QName("class"));
        Aspect aspectInstance = null;
        try {
            if (name == null || clazz == null) {
                throw new RegistryException("Invalid aspect element , required " +
                        "values are missing " + aspect.toString());
            }
View Full Code Here

Examples of org.wso2.carbon.registry.core.Aspect

            resourcePath = processedPath.getPath();

            //TODO need to do the security validation here
            Resource resource = get(resourcePath);
            if ((resource.getAspects() == null) || (!resource.getAspects().contains(aspectName))) {
                Aspect aspect = getAspect(aspectName);
                if (aspect == null) {
                    throw new RegistryException("Couldn't find aspectName '" + aspectName + "'");
                }
                aspect.associate(resource, this);
                resource.addAspect(aspectName);
                put(resource.getPath(), resource);
                registryContext.getLogWriter().addLog(
                        resource.getPath(), CurrentSession.getUser(), LogEntry.ASSOCIATE_ASPECT,
                        aspectName);
View Full Code Here

Examples of org.wso2.carbon.registry.core.Aspect

            }
            resourcePath = processedPath.getPath();

            Resource resource = get(resourcePath);

            Aspect aspect = getResourceAspect(resource, aspectName);
            context.setOldResource(get(resourcePath));
            context.setResource(resource);

            //        List aspectNames = resource.getPropertyValues(Aspect.AVAILABLE_ASPECTS);
            //        if (aspectNames == null) {
            //            throw new RegistryException("No aspect are associated with the resource");
            //        }
            context.setAspect(aspect);
            context.setAction(action);
            registryContext.getHandlerManager().invokeAspect(context);
            if (!context.isSimulation()) {
                if (!context.isProcessingComplete()) {
                    aspect.invoke(context, action);
                }
                resource.discard();

                // transaction succeeded
                transactionSucceeded = true;
View Full Code Here

Examples of org.wso2.carbon.registry.core.Aspect

            }
            resourcePath = processedPath.getPath();

            Resource resource = get(resourcePath);

            Aspect aspect = getResourceAspect(resource, aspectName);
            context.setOldResource(get(resourcePath));
            context.setResource(resource);

            for (Map.Entry<String, String> e : parameters.entrySet()) {
                context.setProperty(e.getKey(), e.getValue());
            }

            context.setProperty("parameterNames",
                    Collections.unmodifiableSet(parameters.keySet()));

            //        List aspectNames = resource.getPropertyValues(Aspect.AVAILABLE_ASPECTS);
            //        if (aspectNames == null) {
            //            throw new RegistryException("No aspect are associated with the resource");
            //        }
            context.setAspect(aspect);
            context.setAction(action);
            registryContext.getHandlerManager().invokeAspect(context);
            if (!context.isSimulation()) {
                if (!context.isProcessingComplete()) {
                    aspect.invoke(context, action, parameters);
                }
                resource.discard();

                // transaction succeeded
                transactionSucceeded = true;
View Full Code Here

Examples of org.wso2.carbon.registry.core.Aspect

        boolean transactionSucceeded = false;
        try {
            // start the transaction
            beginTransaction();

            Aspect aspect = getAspect(aspectName);
            if (aspect == null) {
                throw new RegistryException("Aspect '" + aspectName + "' is not registered!");
            }

            // Confirm this aspect is associated with this Resource
View Full Code Here

Examples of org.wso2.carbon.registry.core.Aspect

                throw new RegistryException(msg);
            }
            resourcePath = processedPath.getPath();

            Resource resource = get(resourcePath);
            Aspect aspect = getResourceAspect(resource, aspectName);

            context.setResource(resource);
            String[] actions = aspect.getAvailableActions(context);

            // transaction succeeded
            transactionSucceeded = true;

            return actions;
View Full Code Here

Examples of rocket.beans.rebind.Aspect

      final AspectTag tag = new AspectTag();
      tag.setElement((Element) nodeList.item(i));
      tag.setFilename(filename);
      tag.setPlaceHolderResolver(placeHolderResolver);

      final Aspect aspect = new Aspect();
      aspect.setAdvisor(tag.getAdvisor());
      aspect.setTarget(tag.getTarget());
      aspect.setMethodExpression(tag.getMethods());
      this.addAspect(aspect);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.