Examples of SupportedResourceType


Examples of org.apache.ws.muse.example.resourceadmin.properties.SupportedResourceType

      {
         // init the {http://org.apache.ws.muse.example.resourceadmin.properties}SupportedResources Resource Property
         resourceProperty = resourcePropertySet.get( ResourceadminPropertyQNames.SUPPORTEDRESOURCES );
         org.apache.ws.muse.example.resourceadmin.properties.SupportedResourcesDocument prop_supportedresources =
            org.apache.ws.muse.example.resourceadmin.properties.SupportedResourcesDocument.Factory.newInstance(  );
         SupportedResourceType                                                          supportedTypes =
            SupportedResourceType.Factory.newInstance(  );

         String[]                                                                       resourceTypes =
            ExampleConstants.getKnownResourceTypes(  );
         for ( int i = 0; i < resourceTypes.length; i++ )
         {
            supportedTypes.addNewResourceType(  ).setStringValue( resourceTypes[i] );
         }

         prop_supportedresources.setSupportedResources( supportedTypes );
         resourceProperty.add( prop_supportedresources );
View Full Code Here

Examples of org.apache.ws.muse.example.resourceadmin.properties.SupportedResourceType

      {
         // init the {http://org.apache.ws.muse.example.resourceadmin.properties}SupportedResources Resource Property
         resourceProperty = resourcePropertySet.get( ResourceadminPropertyQNames.SUPPORTEDRESOURCES );
         org.apache.ws.muse.example.resourceadmin.properties.SupportedResourcesDocument prop_supportedresources =
            org.apache.ws.muse.example.resourceadmin.properties.SupportedResourcesDocument.Factory.newInstance(  );
         SupportedResourceType                                                          supportedTypes =
            SupportedResourceType.Factory.newInstance(  );

         String[]                                                                       resourceTypes =
            ExampleConstants.getKnownResourceTypes(  );
         for ( int i = 0; i < resourceTypes.length; i++ )
         {
            supportedTypes.addNewResourceType(  ).setStringValue( resourceTypes[i] );
         }

         prop_supportedresources.setSupportedResources( supportedTypes );
         resourceProperty.add( prop_supportedresources );
View Full Code Here

Examples of org.fao.geonet.kernel.csw.services.SupportedResourceType

        // resourcetype is a required parameter
        //
        if(resourceType == null) {
            throw new MissingParameterValueEx("ResourceType");
        }
        SupportedResourceType supportedResourceType = SupportedResourceType.fromString(resourceType);
        //
        // resource type not supported
        //
        if(supportedResourceType == null) {
            throw new InvalidParameterValueEx("ResourceType", "ResourceType not supported: " + resourceType);
View Full Code Here

Examples of ro.isdc.wro.model.resource.SupportedResourceType

  /**
   * Computes {@link SupportedResourceType} for provided processor.
   */
  final SupportedResourceType getSupportedResourceTypeForProcessor(final Object processor) {
    SupportedResourceType supportedType = processor.getClass().getAnnotation(SupportedResourceType.class);
    /**
     * This is a special case for processors which implement {@link SupportedResourceTypeProvider} interface. This is
     * useful for decorator processors which needs to "inherit" the {@link SupportedResourceType} of the decorated
     * processor.
     */
 
View Full Code Here

Examples of ro.isdc.wro.model.resource.SupportedResourceType

  /**
   * @return the array of supported resources the processor can process.
   */
  public final ResourceType[] getSupportedResourceTypes() {
    final SupportedResourceType supportedType = getSupportedResourceType();
    return supportedType == null ? ResourceType.values() : new ResourceType[] {
      supportedType.value()
    };
  }
View Full Code Here

Examples of ro.isdc.wro.model.resource.SupportedResourceType

   * @return true if this processor is of searchedType.
   */
  public final boolean isEligible(final boolean minimize, final ResourceType searchedType) {
    Validate.notNull(searchedType);

    final SupportedResourceType supportedType = getSupportedResourceType();
    final boolean isTypeSatisfied = supportedType == null
        || (supportedType != null && searchedType == supportedType.value());
    final boolean isMinimizedSatisfied = minimize == true || !isMinimize();
    return isTypeSatisfied && isMinimizedSatisfied;
  }
View Full Code Here

Examples of ro.isdc.wro.model.resource.SupportedResourceType

  @Test
  public void shouldInvokeLazyProcessor()
      throws Exception {
    final ResourceType expectedResourceType = ResourceType.CSS;
    when(mockProcessorDecorator.isMinimize()).thenReturn(true);
    when(mockProcessorDecorator.getSupportedResourceType()).thenReturn(new SupportedResourceType() {
      public Class<? extends Annotation> annotationType() {
        return SupportedResourceType.class;
      }
     
      public ResourceType value() {
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.