Examples of Record


Examples of com.dotcms.repackage.org.xbill.DNS.Record

import com.dotcms.repackage.org.xbill.DNS.Section;
import com.dotcms.repackage.org.xbill.DNS.Type;

public class DNSUtil {
  public static String reverseDns(String hostIp) throws IOException {
    Record opt = null;
    Resolver res = new ExtendedResolver();
    res.setTimeout(10);
    Name name = ReverseMap.fromAddress(hostIp);
    int type = Type.PTR;
    int dclass = DClass.IN;
    Record rec = Record.newRecord(name, type, dclass);
    Message query = Message.newQuery(rec);
    Message response = res.send(query);

    Record[] answers = response.getSectionArray(Section.ANSWER);
    if (answers.length == 0)
View Full Code Here

Examples of com.extjs.gxt.ui.client.store.Record

      showTooltip(getMessages().getDirtyText());
      return;
    }
    hideTooltip();
    M model = (M) grid.getStore().getAt(rowIndex);
    Record r = getRecord(model);
    RowEditorEvent ree = new RowEditorEvent(this, rowIndex);
    ree.setRecord(r);

    Element row = (Element) grid.getView().getRow(rowIndex);
View Full Code Here

Examples of com.funambol.syncclient.sps.Record

        Vector  replaceTags = new Vector();
        Vector  deleteTags  = new Vector();
        //Vector  statusTags = new Vector();

        String msgId       = null;
        Record  record     = null;
        boolean ret        = false;

        // Get message id
        try {
            msgId = getXMLTagValue(modifications, TAG_MSGID );
        }
        catch (StringIndexOutOfBoundsException e){
            sdh.log("[processModification]Invalid message Id from server: " + modifications);
            throw new SyncException("Invalid message from server.");
        }

        // Get message parts
        xmlResponse.addElement(modifications);
        bodyTags    = getXMLTag(getXMLTag(xmlResponse, TAG_SYNCML),   TAG_SYNCBODY );
        addTags     = getXMLTag(bodyTags, TAG_ADD      );
        replaceTags = getXMLTag(bodyTags, TAG_REPLACE  );
        deleteTags  = getXMLTag(bodyTags, TAG_DELETE   );
        //statusTags  = getXMLTag(bodyTags, TAG_STATUS   );

        if (modifications.indexOf("<" + TAG_SYNC + ">") != - 1) {
            ret = true;
        }

        Hashtable cmd = null;

        // ADD
        for (int i=0, l = addTags.size(); i < l; i++) {
           
            cmd = processModificationCommand( (String)addTags.elementAt(i) );
            // If there is an error status,
            if(cmd.get(TAG_STATUS) != null){
                // Add the status command for this item to the list
                addStatusCommand(TAG_ADD, msgId, cmd);
                continue;
            }

            record = new Record( (String)cmd.get(TAG_LOC_URI), ' ',
                                 (String)cmd.get(TAG_DATA));
            String bbKey = "";
           
            try {
                bbKey = dataStore.setRecord(record, false).getKey();
                // Okay, set status code 200
                cmd.put(TAG_STATUS, String.valueOf(STATUS_CODE_OK));
            }
            catch (DataAccessException e) {
                StaticDataHelper.log("[ERROR]Exception in SyncManagerImpl.processModifications(add) invoking setRecord(...): " + e.toString());
                //e.printStackTrace();
                // Set error status code for this item
                cmd.put(TAG_STATUS, String.valueOf(STATUS_CODE_ERROR));
                String msg = e.getMessage();
                throw new SyncException(msg);//it should be enough to break the sync process
            }
            finally {
                // Add the status command for this item to the list
                addStatusCommand(TAG_ADD, msgId, cmd);
            }

            if (bbKey != null) {   
                ret = true;
                mappings.put(bbKey, cmd.get(TAG_LOC_URI));
            }
        }

        // REPLACE
        for (int i = 0, l = replaceTags.size(); i < l; i++) {
            
            cmd = processModificationCommand((String)replaceTags.elementAt(i));
            // If there is an error status,
            if(cmd.get(TAG_STATUS) != null){
                // Add the status command for this item to the list
                addStatusCommand(TAG_REPLACE, msgId, cmd);
                continue;
            }

            record = new Record( (String)cmd.get(TAG_LOC_URI), ' ',
                                 (String)cmd.get(TAG_DATA) );

            try {
                dataStore.setRecord(record, true);
                // Okay, set status code
                cmd.put(TAG_STATUS, String.valueOf(STATUS_CODE_OK));
            }
            catch(DataAccessException e) {
               
                StaticDataHelper.log("[ERROR]Exception in SyncManagerImpl.processModifications(Replace) invoking setRecord(...): " + e.toString());
                e.printStackTrace();

                // Set error status code for this item
                cmd.put(TAG_STATUS, String.valueOf(STATUS_CODE_ERROR));
            }
            finally {
                // Add the status command for this item to the list
                addStatusCommand(TAG_REPLACE, msgId, cmd);
            }
            ret = true;
        }

        // Delete
        for (int i=0, l = deleteTags.size(); i < l; i++) {
            String key = getXMLTagValue((String) deleteTags.elementAt(i), TAG_LOC_URI );
            String cmdId = getXMLTagValue((String) deleteTags.elementAt(i), TAG_CMDID );
           
            record = new Record();
            record.setKey(key);
           
            // Set cmd info for the status handling
            cmd = new Hashtable();
            cmd.put(TAG_CMDID, cmdId);
            cmd.put(TAG_LOC_URI, key);
View Full Code Here

Examples of com.google.gwt.valuestore.shared.Record

    /*
     * Ensure event receivers aren't accidentally using cached info by making an
     * unpopulated copy of the record.
     */
    newJsoRecord = RecordJsoImpl.emptyCopy(newJsoRecord);
    Record javaRecord = newJsoRecord.getSchema().create(newJsoRecord);
    eventBus.fireEvent(newJsoRecord.getSchema().createChangeEvent(javaRecord,
        op));
  }
View Full Code Here

Examples of com.google.refine.model.Record

       
        Properties bindings = ExpressionUtils.createBindings(project);
        int count = project.recordModel.getRecordCount();
       
        for (int r = 0; r < count; r++) {
            Record record = project.recordModel.getRecord(r);
           
            preprocessing();
           
            for (int i = record.fromRowIndex; i < record.toRowIndex; i++) {
                Row row = project.rows.get(i);
View Full Code Here

Examples of com.google.walkaround.wave.server.auth.AccountStore.Record

    // Google account for contact information and to import waves from; but it
    // is confusing, so we should disable it.)
    userContext.setOAuthCredentials(credentials);
    userContext.setOAuthProvider(oAuthProviders.get(split[0]));

    Record userInfo = userContext.getOAuthProvider().getUserInfo();
    userContext.setUserId(userInfo.getUserId());
    userContext.setParticipantId(userInfo.getParticipantId());
    log.info("User context: " + userContext);
    writeAccountRecordFromContext();
    authorizedCodes.put(split[1], userInfo.getUserId(), Expiration.byDeltaSeconds(30),
        SetPolicy.ADD_ONLY_IF_NOT_PRESENT);

    resp.setContentType("text/html");
    resp.setCharacterEncoding("UTF-8");
    Cookie uid = new Cookie(TokenBasedAccountLookup.USER_ID_KEY, userContext.getUserId().getId());
View Full Code Here

Examples of com.gwtext.client.data.Record

    private static Record[] convertFromNativeRecordsArray(JavaScriptObject nativeArray) {
        JavaScriptObject[] recordsj = JavaScriptObjectHelper.toArray(nativeArray);
        Record[] records = new Record[recordsj.length];
        for (int i = 0; i < recordsj.length; i++) {
            JavaScriptObject record = recordsj[i];
            records[i] = new Record(record);
        }
        return records;
    }
View Full Code Here

Examples of com.hazelcast.map.impl.record.Record

    public void run() {
        final long now = getNow();

        final Iterator<Record> iterator = recordStore.iterator(now, false);
        while (iterator.hasNext()) {
            final Record record = iterator.next();
            final Data dataKey = record.getKey();
            final Object oldValue = record.getValue();

            final Object key = toObject(dataKey);
            final Object value = toObject(oldValue);

            if (!applyPredicate(dataKey, key, value)) {
View Full Code Here

Examples of com.hazelcast.map.record.Record

                }
                if (mapContainer.getWanReplicationPublisher() != null && mapContainer.getWanMergePolicy() != null) {
                    if (EntryEventType.REMOVED.equals(eventType)) {
                        mapService.publishWanReplicationRemove(name, key, Clock.currentTimeMillis());
                    } else {
                        Record record = recordStore.getRecord(key);
                        Data tempValue = mapService.toData(dataValue);
                        final SimpleEntryView entryView = mapService.createSimpleEntryView(key, tempValue, record);
                        mapService.publishWanReplicationUpdate(name, entryView);
                    }
                }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.Record

       
        System.err.println("nodeIndex >>>") ;
        Iterator<Record> iter2 = this.nodeIndex.iterator() ;
        for ( ; iter2.hasNext() ; )
        {
            Record r = iter2.next() ;
            System.err.println(r) ;
        }
        System.err.println("<<<<<<<<<<") ;
    }
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.