Examples of ResourceType


Examples of org.exoplatform.portal.resource.compressor.ResourceType

    }

    public void registerCompressorPlugin(ComponentPlugin plugin) {
        if (plugin instanceof ResourceCompressorPlugin) {
            ResourceCompressorPlugin compressorPlugin = (ResourceCompressorPlugin) plugin;
            ResourceType type = compressorPlugin.getResourceType();
            List<ResourceCompressorPlugin> sameResourceTypePlugins = plugins.get(type);

            if (sameResourceTypePlugins != null) {
                sameResourceTypePlugins.add(compressorPlugin);
                log.debug("Loaded compressor plugin: " + compressorPlugin.getName() + " for resource type " + type.toString());
            } else {
                List<ResourceCompressorPlugin> newListOfPlugins = new ArrayList<ResourceCompressorPlugin>();
                newListOfPlugins.add(compressorPlugin);
                log.debug("Loaded compressor plugin: " + compressorPlugin.getName() + " for new resource type "
                        + type.toString());
                plugins.put(type, newListOfPlugins);
            }
        }
    }
View Full Code Here

Examples of org.jboss.security.authorization.ResourceType

      return am;
   }
  
   private AuthorizationInfo getAuthorizationInfo(String domainName, Resource resource)
   {
      ResourceType layer = resource.getLayer();
     
      //Check if an instance of ApplicationPolicy is available
      if(this.applicationPolicy != null)
         return applicationPolicy.getAuthorizationInfo();
      
View Full Code Here

Examples of org.jboss.security.xacml.core.model.context.ResourceType

     * Creates a {@link ResourceType} with several attributes.
     *
     * @return
     */
    private ResourceType createResource() {
        ResourceType resourceType = new ResourceType();

        AttributeType attResourceID = RequestAttributeFactory.createStringAttributeType(
                "urn:oasis:names:tc:xacml:1.0:resource:resource-id", "xacml20.interop.com", "CustomerAccount");
        resourceType.getAttribute().add(attResourceID);

        AttributeType attOwnerID = RequestAttributeFactory.createStringAttributeType(
                "urn:xacml:2.0:interop:example:resource:owner-id", "xacml20.interop.com", "123456");
        resourceType.getAttribute().add(attOwnerID);

        AttributeType attOwnerName = RequestAttributeFactory.createStringAttributeType(
                "urn:xacml:2.0:interop:example:resource:owner-name", "xacml20.interop.com", "John Smith");
        resourceType.getAttribute().add(attOwnerName);

        AttributeType attAccountStatus = RequestAttributeFactory.createStringAttributeType(
                "urn:xacml:2.0:interop:example:resource:account-status", "xacml20.interop.com", "Active");
        resourceType.getAttribute().add(attAccountStatus);

        AttributeType attCreditLine = RequestAttributeFactory.createIntegerAttributeType(
                "urn:xacml:2.0:interop:example:resource:credit-line", "xacml20.interop.com", 15000);
        resourceType.getAttribute().add(attCreditLine);

        AttributeType attCurrentCredit = RequestAttributeFactory.createIntegerAttributeType(
                "urn:xacml:2.0:interop:example:resource:current-credit", "xacml20.interop.com", 10000);
        resourceType.getAttribute().add(attCurrentCredit);

        AttributeType attTradeLimit = RequestAttributeFactory.createIntegerAttributeType(
                "urn:xacml:2.0:interop:example:resource:trade-limit", "xacml20.interop.com", 10000);
        resourceType.getAttribute().add(attTradeLimit);
        return resourceType;
    }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.ResourceType

      //Create a target
      TargetType targetType = new TargetType();

      ResourcesType resourcesType = new ResourcesType();
      ResourceType resourceType = new ResourceType();
      ResourceMatchType rmt = new ResourceMatchType();
      rmt.setMatchId(XACMLConstants.FUNCTION_ANYURI_EQUAL);
      rmt.setResourceAttributeDesignator(PolicyAttributeFactory.createAttributeDesignatorType(
            XACMLConstants.ATTRIBUTEID_RESOURCE_ID, XMLSchemaConstants.DATATYPE_ANYURI, null, false));
      rmt.setAttributeValue(PolicyAttributeFactory
            .createAnyURIAttributeType(new URI("http://test/developer-guide.html")));
      resourceType.getResourceMatch().add(rmt);
      resourcesType.getResource().add(resourceType);

      targetType.setResources(resourcesType);

      policyType.setTarget(targetType);
View Full Code Here

Examples of org.jfree.layouting.layouter.content.type.ResourceType

    {
      final GenericType generic = (GenericType) content;
      ResourceKey source = null;
      if (content instanceof ResourceType)
      {
        final ResourceType resourceType = (ResourceType) content;
        source = resourceType.getContent().getSource();
      }

      final Object raw = generic.getRaw();
      if (raw instanceof Image)
      {
View Full Code Here

Examples of org.kie.api.io.ResourceType

        if (resource != null) {
            if (conf == null) {
                ckbuilder.add(resource,
                              ResourceType.determineResourceType(fileName));
            } else {
                ResourceType confType = conf instanceof ResourceConfigurationImpl ?
                                        ((ResourceConfigurationImpl)conf).getResourceType() :
                                        null;
                ckbuilder.add(resource,
                              confType != null ? confType : ResourceType.determineResourceType(fileName),
                              conf);
View Full Code Here

Examples of org.kie.api.io.ResourceType

    public ResourceChangeSet diffResource(String file,
                                          byte[] ob,
                                          byte[] cb) {
        ResourceChangeSet pkgcs = new ResourceChangeSet( file, ChangeType.UPDATED );
        ResourceType type = ResourceType.determineResourceType( file );
        if( ResourceType.DRL.equals( type ) || ResourceType.GDRL.equals( type ) || ResourceType.RDRL.equals( type )) {
            try {
                PackageDescr opkg = new DrlParser().parse( new ByteArrayResource( ob ) );
                PackageDescr cpkg = new DrlParser().parse( new ByteArrayResource( cb ) );
               
View Full Code Here

Examples of org.kie.api.io.ResourceType

        if (resource != null) {
            if (conf == null) {
                ckbuilder.add(resource,
                              ResourceType.determineResourceType(fileName));
            } else {
                ResourceType confType = conf instanceof ResourceConfigurationImpl ?
                                        ((ResourceConfigurationImpl)conf).getResourceType() :
                                        null;
                ckbuilder.add(resource,
                              confType != null ? confType : ResourceType.determineResourceType(fileName),
                              conf);
View Full Code Here

Examples of org.kie.api.io.ResourceType

    public ResourceChangeSet diffResource(String file,
                                          byte[] ob,
                                          byte[] cb) {
        ResourceChangeSet pkgcs = new ResourceChangeSet( file, ChangeType.UPDATED );
        ResourceType type = ResourceType.determineResourceType( file );
        if( ResourceType.DRL.equals( type ) || ResourceType.GDRL.equals( type ) || ResourceType.RDRL.equals( type ) || ResourceType.TDRL.equals( type )) {
            try {
                PackageDescr opkg = new DrlParser().parse( new ByteArrayResource( ob ) );
                PackageDescr cpkg = new DrlParser().parse( new ByteArrayResource( cb ) );
                String pkgName = isEmpty(cpkg.getName()) ? getDefaultPackageName() : cpkg.getName();
View Full Code Here

Examples of org.kie.api.io.ResourceType

                }

                if ( ! newPkg.getResourceTypePackages().isEmpty() ) {
                    KieWeavers weavers = ServiceRegistryImpl.getInstance().get(KieWeavers.class);
                    for ( ResourceTypePackage rtkKpg : newPkg.getResourceTypePackages().values() ) {
                        ResourceType rt = rtkKpg.getResourceType();
                        KieWeaverService factory = weavers.getWeavers().get( rt );
                        factory.weave( this, newPkg, rtkKpg );
                    }
                }
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.