Examples of create()


Examples of org.apache.shindig.gadgets.http.HttpResponseBuilder.create()

  @Test
  public void testHandleResponse_3() throws Exception {
    final OAuth2Accessor accessor = MockUtils.getOAuth2Accessor_Code();
    final HttpResponseBuilder builder = new HttpResponseBuilder().setStrictNoCache();
    builder.setHttpStatusCode(HttpResponse.SC_FORBIDDEN);
    final HttpResponse response = builder.create();

    final OAuth2HandlerError result = TokenAuthorizationResponseHandlerTest.tarh.handleResponse(
        accessor, response);

    Assert.assertNotNull(result);

Examples of org.apache.shiro.session.mgt.eis.SessionDAO.create()

            public Session createSession(SessionContext initData) {
                return activeSession[0];
            }
        });

        expect(sessionDAO.create(eq(session1))).andReturn(sessionId1);
        sessionDAO.update(eq(session1));
        expectLastCall().anyTimes();
        replay(sessionDAO);
        Session session = sm.start(null);
        assertNotNull(session);

Examples of org.apache.slide.content.Content.create()

            NodeRevisionDescriptor descriptor = new NodeRevisionDescriptor();
            descriptor.setCreationDate(new Date());
            descriptor.setLastModified(new Date());
            descriptor.setProperty(new NodeProperty(
                "password",password,NodeProperty.SLIDE_NAMESPACE));
            content.create(slideToken,userUri,descriptor,null);
           
            nat.commit();
        }
        catch (Exception e) {
            try {

Examples of org.apache.slide.structure.Structure.create()

        try {
           
            nat.begin();
           
            ObjectNode user = new SubjectNode();
            structure.create(slideToken,user,userUri);
           
            // create the user descriptor
            NodeRevisionDescriptor descriptor = new NodeRevisionDescriptor();
            descriptor.setCreationDate(new Date());
            descriptor.setLastModified(new Date());

Examples of org.apache.sling.api.resource.ModifyingResourceProvider.create()

        final ProviderHandler handler = this.getModifyingProviderHandler(ctx, resourceResolver, fullPath);
        if ( handler == null || !handler.canCreate(ctx, resourceResolver, fullPath) ) {
            throw new UnsupportedOperationException("create '" + ResourceUtil.getName(fullPath) + "' at " + ResourceUtil.getParent(fullPath));
        }
        final ModifyingResourceProvider mrp = (ModifyingResourceProvider) handler.getResourceProvider(ctx);
        return mrp.create(resourceResolver, fullPath, properties);
    }

    private static final char SPLIT_SEP = '/';
    private static final String[] EMPTY_RESULT = new String[0];

Examples of org.apache.sling.api.resource.ResourceResolver.create()

        final String announcementJson = asJSON();
    if (announcementChildResource==null) {
            final ResourceResolver resourceResolver = announcementsResource.getResourceResolver();
            Map<String, Object> properties = new HashMap<String, Object>();
            properties.put("topologyAnnouncement", announcementJson);
            resourceResolver.create(announcementsResource, getPrimaryKey(), properties);
        } else {
            final ModifiableValueMap announcementChildMap = announcementChildResource.adaptTo(ModifiableValueMap.class);
            announcementChildMap.put("topologyAnnouncement", announcementJson);
        }
    }

Examples of org.apache.sling.cassandra.resource.provider.CassandraResourceProvider.create()

                    String path = parentPath + cfs[k] + "/" + i;
                    Map<String, Object> map1 = new HashMap<String, Object>();
                    map1.put("metadata", "resolutionPathInfo=json");
                    map1.put("resourceType", "nt:cassandra0");
                    map1.put("resourceSuperType", "nt:supercass1");
                    cassandraResourceProvider.create(resolver, path, map1);
                    cassandraResourceProvider.commit(resolver);
                    System.out.println(">>" + path);
                }
            }
        } catch (Exception e) {

Examples of org.apache.solr.analysis.TokenizerFactory.create()

    final TokenizerFactory factory = tf == null ? null : loadTokenizerFactory(loader, tf, args);

    Analyzer analyzer = new ReusableAnalyzerBase() {
      @Override
      protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader) {
        Tokenizer tokenizer = factory == null ? new WhitespaceTokenizer(Version.LUCENE_31, reader) : factory.create(reader);
        TokenStream stream = ignoreCase ? new LowerCaseFilter(Version.LUCENE_31, tokenizer) : tokenizer;
        return new TokenStreamComponents(tokenizer, stream);
      }
    };

Examples of org.apache.solr.analysis.WordDelimiterFilterFactory.create()

   
    /* default behavior */
    factoryDefault.init(args);
    factoryDefault.inform(loader);
   
    TokenStream ts = factoryDefault.create(
        new WhitespaceTokenizer(BaseTokenTestCase.DEFAULT_VERSION, new StringReader(testText)));
    BaseTokenTestCase.assertTokenStreamContents(ts,
        new String[] { "I", "borrowed", "5", "400", "00", "540000", "at", "25", "interest", "rate", "interestrate" });

    ts = factoryDefault.create(

Examples of org.apache.solr.core.CoreContainer.create()

    super.setUp();

    SolrResourceLoader loader = new SolrResourceLoader(getSolrHome());
    CoreContainer container = new CoreContainer(loader);
    CoreDescriptor descriptor = new CoreDescriptor(container, "cname", ".");
    SolrCore core = container.create(descriptor);
    container.register(core.getName(), core, false);

    solr = new EmbeddedSolrServer(container, core.getName());
  }
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.