Package org.structr.core.property

Examples of org.structr.core.property.PropertyKey


    try {

      final Class type        = TestSeven.class;
      final PropertyMap props = new PropertyMap();
      final PropertyKey lat   = TestSeven.latitude;
      final PropertyKey lon   = TestSeven.longitude;

      props.put(AbstractNode.type, type.getSimpleName());
      props.put(lat, 50.12284d);
      props.put(lon, 8.73923d);
      props.put(AbstractNode.name, "TestSeven-0");;
View Full Code Here


  public void test07SearchByStaticMethod01() {

    try {

      PropertyMap props     = new PropertyMap();
      final PropertyKey key = AbstractNode.name;
      final String name     = "89w3hkl sdfghsdkljth";

      props.put(key, name);

      final AbstractNode node = createTestNode(TestOne.class, props);
View Full Code Here

  public void test08SearchByStaticMethod02() {

    try {

      PropertyMap props     = new PropertyMap();
      final PropertyKey key = AbstractNode.name;
      final String name     = "89w3hkl sdfghsdkljth";

      props.put(key, name);

      final AbstractNode node = createTestNode(TestOne.class, props);
View Full Code Here

  public void test08SearchByStaticMethodWithNullSearchValue01() {

    try {

      PropertyMap props     = new PropertyMap();
      final PropertyKey key = AbstractNode.name;
      final String name     = "abc";

      props.put(key, name);

      createTestNode(TestOne.class, props);
View Full Code Here

    final SecurityContext securityContext = getWebSocket().getSecurityContext();
    final String sortOrder                = webSocketData.getSortOrder();
    final String sortKey                  = webSocketData.getSortKey();
    final int pageSize                    = webSocketData.getPageSize();
    final int page                        = webSocketData.getPage();
    final PropertyKey sortProperty        = StructrApp.getConfiguration().getPropertyKeyForJSONName(DOMNode.class, sortKey);
    final Query query                     = StructrApp.getInstance(securityContext).nodeQuery().includeDeletedAndHidden().sort(sortProperty).order("desc".equals(sortOrder));
   
    query.orTypes(DOMElement.class);
    query.orType(Content.class);
View Full Code Here

        String value = oauthServer.getCredential(request);
        logger.log(Level.FINE, "Got credential value: {0}", new Object[] { value });

        if (value != null) {

          PropertyKey credentialKey = oauthServer.getCredentialKey();

          Principal user = AuthHelper.getPrincipalForCredential(credentialKey, value);

          if (user == null && userAutoCreate) {
View Full Code Here

            for (Entry entry : nodeData.entrySet()) {

              String key = (String) entry.getKey();
              Object val = entry.getValue();

              PropertyKey propertyKey = StructrApp.getConfiguration().getPropertyKeyForDatabaseName(newNode.getClass(), key);
              if (propertyKey != null) {

                try {
                  Object convertedValue = val;

                  PropertyConverter inputConverter = propertyKey.inputConverter(SecurityContext.getSuperUserInstance());
                  if (inputConverter != null) {

                    convertedValue = inputConverter.convert(val);
                  }
View Full Code Here

        final GraphObject currentDataNode = renderContext.getDataObject();

        // fetch (optional) list of external data elements
        final List<GraphObject> listData = checkListSources(securityContext, renderContext);

        final PropertyKey propertyKey;

        if (getProperty(renderDetails) && detailMode) {

          renderContext.setDataObject(details);
          renderContext.putDataObject(subKey, details);
View Full Code Here

      final PropertyMap properties = new PropertyMap();

      for (Iterator<PropertyKey> it = getPropertyKeys(uiView.name()).iterator(); it.hasNext();) {

        PropertyKey key = it.next();

        // omit system properties (except type), parent/children and page relationships
        if (key.equals(GraphObject.type) || (!key.isUnvalidated()
          && !key.equals(GraphObject.id)
          && !key.equals(DOMNode.ownerDocument) && !key.equals(DOMNode.pageId)
          && !key.equals(DOMNode.parent) && !key.equals(DOMNode.parentId)
          && !key.equals(DOMElement.syncedNodes)
          && !key.equals(DOMNode.children) && !key.equals(DOMNode.childrenIds))) {

          properties.put(key, getProperty(key));
        }
      }
View Full Code Here

    String sortOrder = request.getParameter(JsonRestServlet.REQUEST_PARAMETER_SORT_ORDER);
    String sortKeyName = request.getParameter(JsonRestServlet.REQUEST_PARAMETER_SORT_KEY);
    boolean sortDescending = (sortOrder != null && "desc".equals(sortOrder.toLowerCase()));
    int pageSize = parseInt(pageSizeParameter, NodeFactory.DEFAULT_PAGE_SIZE);
    int page = parseInt(pageParameter, NodeFactory.DEFAULT_PAGE);
    PropertyKey sortKey = null;

    // set sort key
    if (sortKeyName != null) {

      Class<? extends GraphObject> type = resource.getEntityClass();
View Full Code Here

TOP

Related Classes of org.structr.core.property.PropertyKey

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.