Package org.jitterbit.integration.data.entity

Examples of org.jitterbit.integration.data.entity.IntegrationEntityId


        }

        private EntityWarning[] restoreItemWarnings(Persistor p) {
            List<EntityWarning> warnings = Lists.newArrayList();
            for (Persistor child : p.getChildren(ITEM_WARNING)) {
                final IntegrationEntityId id = restoreEntityId(child);
                final String warning = child.getString(VALUE);
                warnings.add(new EntityWarning() {

                    @Override
                    public IntegrationEntityId getIntegrationEntityId() {
View Full Code Here


        }

        private RenamedEntity[] restoreRenamedItems(Persistor p) {
            List<RenamedEntity> renames = Lists.newArrayList();
            for (Persistor child : p.getChildren(ITEM_RENAME)) {
                final IntegrationEntityId id = restoreEntityId(child);
                if (id == null) {
                    continue;
                }
                final String oldName = child.getString(OLD_NAME);
                final String newName = child.getString(NEW_NAME);
View Full Code Here

        }

        private String getMessage(Object selected) {
            String message = "";
            if (selected instanceof ListItem) {
                IntegrationEntityId id = ((ListItem) selected).getEntityId();
                message = getWarningMessage(id);
                if (message.length() > 0) {
                    message += "\n\n";
                }
                message += getRenameMessage(id);
View Full Code Here

    private static JLabel createTitle(DebugSession session) {
        String text;
        String provider = session.getTestProviderId();
        if (provider.equals(TestScriptProvider.ID)) {
            IntegrationEntityId id = session.getDebugeeId();
            if (id instanceof ScriptId) {
                text = "Test Script";
            } else if (id instanceof TransformationId) {
                text = "Test Mapping";
            } else {
                throw new RuntimeException("Unexpected ID type: " + id.getEntityType());
            }
        } else if (provider.equals(TestOperationProvider.ID)) {
            text = "Test Operation";
        } else if (provider.equals(TestTransformationProvider.ID)) {
            text = "Test Transformation";
View Full Code Here

        return new JLabel(text);
    }

    private static JLabel createItemLabel(DebugSession session, IntegrationEntityLookup lookup) {
        JLabel label = new JLabel();
        IntegrationEntityId id = session.getDebugeeId();
        IntegrationEntity item = lookup.getEntity(id);
        if (item != null) {
            RendererUtils.decorateRenderer(label, item, Size.SMALL);
        } else {
            label.setText("GUID: " + id);
            RendererUtils.decorateRenderer(label, id.getEntityType());
        }
        return label;
    }
View Full Code Here

    private static final String ENTITY_ID = "EntityId";

    void persist(DeployedEntityDescriptor descriptor, Persistor p) {
        Persistor p2 = p.createChild(DESCRIPTOR);
        IntegrationEntityId id = descriptor.getId();
        p2.putString(ENTITY_TYPE, id.getEntityType().name());
        p2.putString(ENTITY_ID, id.toString());
        p2.putString(ENTITY_NAME, descriptor.getName());
        for (DeployedEntityDescriptor child : descriptor.getChildren()) {
            persist(child, p2);
        }
    }
View Full Code Here

        boolean hasStringArg = it.hasNext() && (t=it.next()).m_id==Transform.t_StrC;
        if (hasStringArg) {
          try {
              // "op.9a768b3b-2a2d-490d-baec-7506e4286851" --> 9a768b3b-2a2d-490d-baec-7506e4286851
            String idAsString = t.getStr().substring(skip,skip + /*GUID-length*/36);
            IntegrationEntityId id = createIdFromFunctionArg(idAsString, tagPrefix);
            if (idClass.isInstance(id)) {
              ids.add(idClass.cast(id));
            }
          } catch (Exception e) {
                      String funcName = stripTrailingBrace(func);
View Full Code Here

          try {
            ProjectItemFunction f = (ProjectItemFunction)FunctionRegistry.getRegistry().getFunctionByName(funcName);
            String prefix = f.getProjectPrefixes(); // there's only one prefix per function for now
            int skip = prefix.length() + 2;
            String idAsString = t.getStr().substring(skip,t.getStr().length()-1); // "op.9a768b3b-2a2d-490d-baec-7506e4286851" --> 9a768b3b-2a2d-490d-baec-7506e4286851
            IntegrationEntityId id = createIdFromFunctionArg(idAsString, prefix);
            if (id != null) {
                          ids.add(id);
            } else {
                throw new Exception("createIdFromFunctionArg returned null");
            }
View Full Code Here

            }
        }

        private IntegrationEntity identityEntity(Element entityElement) {
            EntityType type = EntityType.valueOf(entityElement.getAttribute(XmlConstants.ENTITY_TYPE));
            IntegrationEntityId id = type.getIntegrationId(entityElement.getAttribute(XmlConstants.ENTITY_ID));
            IntegrationEntityLookup lookup = project.getProject().getItemLookup();
            IntegrationEntity entity = lookup.getEntity(id);
            if (entity.isDeleted()) {
                // This happens if a deployed entity has been deleted, and the plugin info
                // file wasn't correctly updated before shutdown. The entries for the deleted
View Full Code Here

    @Override
    public IntegrationEntityId getGuid(EntityType entityType, long itemId) throws GuidToIdMappingException {
        IdMaps cache = cachedIds.get(entityType);
        synchronized (lock) {
            IntegrationEntityId guid = cache.getGuid(itemId);
            if (guid == null) {
                guid = decoratee.getGuid(entityType, itemId);
                cache.store(Long.valueOf(itemId), guid);
            }
            return guid;
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.entity.IntegrationEntityId

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.