Publish an Entry.

@param entry Entry
@return {@link CMAEntry} result instance
@throws IllegalArgumentException if entry is null.
@throws IllegalArgumentException if entry's id is null.
@throws IllegalArgumentException if entry's space id is null.
439347
public CMAEntry publish(CMAEntry entry) {
    assertNotNull(entry, "entry");
    final String entryId = getResourceIdOrThrow(entry, "entry");
    final String environmentId = entry.getEnvironmentId();
    final String spaceId = getSpaceIdOrThrow(entry, "entry");

    return service.publish(
        entry.getSystem().getVersion(),
        spaceId,
        environmentId,
        entryId).blockingFirst();
  }
296066
private void writeExternalEntry0(ReplicableEntry entry, Bytes destination) {
        destination.writeByte(ENTRY_HUNK);

        destination.writeStopBit(entry.originTimestamp());
        if (entry.originIdentifier() == 0)
            throw new IllegalStateException("Identifier can't be 0");
        destination.writeByte(entry.originIdentifier());

        Data key;
        boolean isDeleted;
        if (entry instanceof MapEntry) {
            isDeleted = false;
            key = ((MapEntry) entry).key();
        } else {
            isDeleted = true;
            key = ((MapAbsentEntry) entry).absentKey();
        }

        destination.writeBoolean(isDeleted);

        keySizeMarshaller.writeSize(destination, key.size());
        key.writeTo(destination, destination.writePosition());
        destination.writeSkip(key.size());

        boolean debugEnabled = LOG.isDebugEnabled();
        String message = null;
        if (debugEnabled) {
            if (isDeleted) {
                LOG.debug("WRITING ENTRY TO DEST -  into local-id={}, remove(key={})",
                        identifier(), key);
            } else {
                message = String.format(
                        "WRITING ENTRY TO DEST  -  into local-id=%d, put(key=%s,",
                        identifier(), key);
            }
        }

        if (isDeleted)
            return;

        Data value = ((MapEntry) entry).value();
        valueSizeMarshaller.writeSize(destination, value.size());
        value.writeTo(destination, destination.writePosition());
        destination.writeSkip(value.size());

        if (debugEnabled) {
            LOG.debug(message + "value=" + value + ")");
        }
    }
357517
private CmsFavoriteEntry getEntry(Component row) {

        if (row instanceof CmsFavInfo) {

            return ((CmsFavInfo)row).getEntry();

        }
        return null;

    }
244267
public void add(CmsLogEntry entry) {

        CmsUUID userId = entry.getUserId();
        CmsUUID structureId = entry.getStructureId();
        if ((userId == null) || (structureId == null)) {
            return;
        }
        CmsPair<CmsUUID, CmsUUID> key = CmsPair.create(userId, structureId);
        if (isDeleting(entry)) {
            m_state.put(key, Long.valueOf(-1));
        } else if (isChanging(entry)) {
            m_state.put(key, Long.valueOf(entry.getDate()));
        }
    }
759702
public CmsSitemapTreeItem create(CmsClientSitemapEntry entry) {

        CmsSitemapTreeItem treeItem = new CmsSitemapTreeItem(entry);
        CmsSitemapHoverbar.installOn(m_controller, treeItem, entry.getId());
        // highlight the open path
        if (isLastPage(entry)) {
            treeItem.setBackgroundColor(Background.YELLOW);
        }
        m_treeItems.put(entry.getId(), treeItem);
        return treeItem;
    }
320616
public Entry newEntry(Key key, QualifiedName entity) {
	Entry res = of.createEntry();
	res.setKey(key);
	res.setEntity(entity);
	return res;
    }
1252294
public V put(Map.Entry<K, V> entry) {
        return put(entry.getKey(), entry.getValue());
    }
156155
public void setEntry(AclEntry entry) {
    // TODO(cc): when setting non-mask entries, the mask should be dynamically updated too.
    switch (entry.getType()) {
      case NAMED_USER:
        mNamedUserActions.put(entry.getSubject(), entry.getActions());
        return;
      case NAMED_GROUP:
        mNamedGroupActions.put(entry.getSubject(), entry.getActions());
        return;
      case MASK:
        mMaskActions = entry.getActions();
        return;
      case OWNING_USER:  // fall through
      case OWNING_GROUP: // fall through
      case OTHER:
        throw new IllegalStateException(
            "Deleting base entry is not allowed. entry: " + entry);
      default:
        throw new IllegalStateException("Unknown ACL entry type: " + entry.getType());
    }
  }
1312989
public CmsCategoryTreeEntry getEntryById(CmsUUID id) {

        for (CmsCategoryTreeEntry entry : getFlatList()) {
            if (id.equals(entry.getId())) {
                return entry;
            }
        }
        return null;
    }
368155
public static String createEntryIdentity(Entry entry) throws UnableToAdaptException {
        String result = "";
        while (entry != null && !entry.getPath().isEmpty()) {
            result = entry.getPath() + result;
            entry = entry.getRoot().adapt(Entry.class);
        }

        return result;
    }
432348
@Override
    public void putEntry(final AtomRequest areq, final Entry entry) throws AtomException {
        LOG.debug("putEntry");
        final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/");
        final String handle = pathInfo[0];
        final String collection = pathInfo[1];
        final String fileName = pathInfo[2];
        final FileBasedCollection col = service.findCollectionByHandle(handle, collection);
        try {
            col.updateEntry(entry, fileName);

        } catch (final Exception fe) {
            throw new AtomException(fe);
        }
    }
417085
private CmsFavInfo createFavInfo(CmsFavoriteEntry entry) throws CmsException {

        String title = "";
        String subtitle = "";
        CmsFavInfo result = new CmsFavInfo(entry);
        CmsObject cms = A_CmsUI.getCmsObject();
        String project = getProject(cms, entry);
        String site = getSite(cms, entry);
        try {
            CmsUUID idToLoad = entry.getDetailId() != null ? entry.getDetailId() : entry.getStructureId();
            CmsResource resource = cms.readResource(idToLoad, CmsResourceFilter.IGNORE_EXPIRATION.addRequireVisible());
            CmsResourceUtil resutil = new CmsResourceUtil(cms, resource);
            switch (entry.getType()) {
                case explorerFolder:
                    title = CmsStringUtil.isEmpty(resutil.getTitle())
                    ? CmsResource.getName(resource.getRootPath())
                    : resutil.getTitle();
                    break;
                case page:
                    title = resutil.getTitle();
                    break;
            }
            subtitle = resource.getRootPath();
            CmsResourceIcon icon = result.getResourceIcon();
            icon.initContent(resutil, CmsResource.STATE_UNCHANGED, false, false);
        } catch (CmsException e) {
            LOG.warn(e.getLocalizedMessage(), e);
        }
        result.getTopLine().setValue(title);
        result.getBottomLine().setValue(subtitle);
        result.getProjectLabel().setValue(project);
        result.getSiteLabel().setValue(site);

        return result;

    }
456404
public static AttributeAccessor<?> create(ArchiveEntry entry) {
        if (entry instanceof TarArchiveEntry) {
            return new TarAttributeAccessor((TarArchiveEntry) entry);
        } else if (entry instanceof ZipArchiveEntry) {
            return new ZipAttributeAccessor((ZipArchiveEntry) entry);
        } else if (entry instanceof CpioArchiveEntry) {
            return new CpioAttributeAccessor((CpioArchiveEntry) entry);
        } else if (entry instanceof ArjArchiveEntry) {
            return new ArjAttributeAccessor((ArjArchiveEntry) entry);
        } else if (entry instanceof ArArchiveEntry) {
            return new ArAttributeAccessor((ArArchiveEntry) entry);
        }

        return new FallbackAttributeAccessor(entry);
    }
519433
public static URL createMemoryURL(final String entryName, final byte[] entry) {
		try {
			final Class c = ClassLoader.getSystemClassLoader().loadClass(
					"org.allcolor.yahp.converter.CMemoryURLHandler");
			final Method m = c.getDeclaredMethod("createMemoryURL",
					new Class[] { String.class, byte[].class });
			m.setAccessible(true);
			return (URL) m.invoke(null, new Object[] { entryName, entry });
		} catch (final Exception ignore) {
			ignore.printStackTrace();
			return null;
		}
	}
1351496
void add(Entry<String, Point2d[]> entry) {
        if (entry != null) templateMap.put(entry.getKey(), entry.getValue());
    }
313347
public void createSubSitemap(final CmsUUID entryId) {

        CmsRpcAction<CmsSitemapChange> subSitemapAction = new CmsRpcAction<CmsSitemapChange>() {

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
             */
            @Override
            public void execute() {

                start(0, true);
                getService().createSubSitemap(entryId, this);
            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
             */
            @Override
            protected void onResponse(CmsSitemapChange result) {

                stop(false);
                applyChange(result);
            }
        };
        subSitemapAction.execute();
    }
8170
public void setAllowedPermissions(CmsAccessControlEntry entry) {

        CmsPermissionSetCustom p = m_permissions.get(entry.getPrincipal());
        if (p == null) {
            p = new CmsPermissionSetCustom();
            m_permissions.put(entry.getPrincipal(), p);
        }
        p.setPermissions(entry.getAllowedPermissions(), p.getDeniedPermissions());
    }