Package org.jitterbit.integration.data.entity

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


    public static final class Factory extends AbstractFactory<TestConnectionResult> {

        @Override
        public TestConnectionResult restore(Persistor p) {
            EntityType entityType = restoreEntityType(p);
            IntegrationEntityId entityId = restoreEntityId(p, ENTITY_ID, entityType);
            long timestamp = restoreTimestamp(p);
            Outcome outcome = restoreOutcome(p);
            String message = restoreDetails(p);
            TestConnectionResult result = new TestConnectionResult(entityId, timestamp, outcome, message);
View Full Code Here


    private static Icon getSubjectIcon(ActivitySubject subject) {
        ActivitySubjectType subjectType = subject.getId().getType();
        if (subjectType == ActivitySubjectType.SERVER) {
            return ClientIcons.SERVER_16;
        }
        EntityType entityType = ActivityUtils.toEntityType(subjectType);
        if (entityType != null) {
            return EntityIcons.forType(entityType).getDefaultIcon(Size.SMALL);
        }
        return null;
    }
View Full Code Here

     *            the <code>PipelineActivityType</code> for which to retrieve an icon
     * @return a small (16x16) icon representing the given type, or <code>null</code> if no
     *         corresponding icon exists
     */
    public static Icon smallIcon(PipelineActivityType type) {
        EntityType entityType = toEntityType(type);
        if (entityType != null) {
            return EntityIcons.forType(entityType).getDefaultIcon(Size.SMALL);
        }
        if (type == PipelineActivityType.PLUGIN) {
            throw new NotImplementedYetException();
View Full Code Here

*/
public final class ActivityUtils {

    public static boolean isValidType(IntegrationEntity entity) {
        if (entity instanceof Folder) {
            EntityType itemType = ((Folder) entity).getItemType();
            // Listing logs for a folder of wizards must be handled on the server side before
            // we allow it in the UI.
            return !itemType.isWizardType() && isValidType(itemType);
        }
        return isValidType(entity.getEntityType());
    }
View Full Code Here

                writer.writeGroup(p.entityId, p.roleId, p.allowedBits(), p.deniedBits());
            }
        }

        private PermissionsFileWriter getWriter(RolePermission<?> p) {
            EntityType entityType = p.entityId.getEntityType();
            PermissionsFileWriter w = writers.get(entityType);
            if (w == null) {
                w = new PermissionsFileWriter(root, p.entityId.getEntityType());
                writers.put(p.entityId.getEntityType(), w);
            }
View Full Code Here

            };
            IconValue iv = new IconValue() {

                @Override
                public Icon getIcon(Object value) {
                    EntityType type = ((IntegrationEntity) value).getEntityType();
                    return EntityIcons.forType(type).getDefaultIcon(Size.SMALL);
                }
            };
            return new DefaultTableRenderer(sv, iv);
        }
View Full Code Here

        updateContent(previousContent);
    }
   
    @Override
    public String getPresentationName() {
        EntityType type;
        if (newContent != null) {
            type = newContent.getEntityType();
        } else if (previousContent != null) {
            type = previousContent.getEntityType();
        } else {
View Full Code Here

        }
        return veto;
    }

    public ItemPermissions getItemPermissions(IntegrationEntity entity) {
        EntityType type = entity.getEntityType();
        IntegrationEntityId id = entity.getID();
        UserMap um = userMaps.get(type);
        List<UserPermission> userEntries = um.getAllPermissionsForItem(id);
        GroupMap gm = groupMaps.get(type);
        List<GroupPermission> groupEntries = gm.getAllPermissionsForItem(id);
View Full Code Here

        List<GroupPermission> groupEntries = gm.getAllPermissionsForItem(id);
        return new ItemPermissions(userEntries, groupEntries);
    }

    public void removeEntity(IntegrationEntity entity) {
        EntityType type = entity.getEntityType();
        IntegrationEntityId id = entity.getID();
        userMaps.get(type).remove(id);
        groupMaps.get(type).remove(id);
    }
View Full Code Here

            }
        }

        private String fetchSchemaNameFromLoginName(String id) throws Exception, XPathExpressionException {
            // TODO: Check manual connection string.
            EntityType type = sourceOrTarget == SourceTarget.Source ? EntityType.Source : EntityType.Target;
            File dataFile = projectRoot.subFolder("Data").subFolder(type.name()).getFile(id + ".xml");
            Document dom = DomParser.parseFile(dataFile);
            XPath xpath = XPathFactory.newInstance().newXPath();
            NodeList nodes = (NodeList) xpath.evaluate("/Entity/Location/Data/Properties/Item[@key='login']", dom, XPathConstants.NODESET);
            if (nodes.getLength() == 0) {
                throw new Exception("The user name has not been defined for the source or target with ID " + id);
View Full Code Here

TOP

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

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.