Examples of FileInfo


Examples of org.alfresco.service.cmr.model.FileInfo

  }

  public void createDocument(NodeRef folderRef, Content content) {
    String fileName = content.getName();
    FileInfo fileInfo = serviceRegistry.getFileFolderService().create(folderRef, fileName,
        ContentModel.TYPE_CONTENT);
    NodeRef fileNodeRef = fileInfo.getNodeRef();
    serviceRegistry.getNodeService().addAspect(fileNodeRef, ContentModel.ASPECT_AUTHOR, null);
    serviceRegistry.getNodeService().addAspect(fileNodeRef, ContentModel.ASPECT_TITLED, null);
    Map<QName, Serializable> props = serviceRegistry.getNodeService().getProperties(fileNodeRef);
    props.put(ContentModel.PROP_CREATED, new Date());
    String currentUserName = serviceRegistry.getAuthenticationService().getCurrentUserName();
View Full Code Here

Examples of org.apache.accumulo.server.util.FileUtil.FileInfo

  @Before
  public void setUp() {
    key1 = new Key("row1");
    key2 = new Key("row2");
    info = new FileInfo(key1, key2);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFile.FileInfo

    metaBlockIndexReader.readRootIndex(
        blockIter.nextBlockWithBlockType(BlockType.ROOT_INDEX),
        trailer.getMetaIndexCount());

    // File info
    fileInfo = new FileInfo();
    fileInfo.read(blockIter.nextBlockWithBlockType(BlockType.FILE_INFO).getByteStream());
    lastKey = fileInfo.get(FileInfo.LASTKEY);
    avgKeyLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_KEY_LEN));
    avgValueLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_VALUE_LEN));
    byte [] keyValueFormatVersion =
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFile.FileInfo

    if (fileInfoLoaded)
      return fileInfo;

    // Read in the fileinfo and get what we need from it.
    istream.seek(trailer.getFileInfoOffset());
    fileInfo = new FileInfo();
    fileInfo.readFields(istream);
    lastKey = fileInfo.get(FileInfo.LASTKEY);
    avgKeyLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_KEY_LEN));
    avgValueLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_VALUE_LEN));
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFile.FileInfo

    metaBlockIndexReader.readRootIndex(
        blockIter.nextBlockWithBlockType(BlockType.ROOT_INDEX),
        trailer.getMetaIndexCount());

    // File info
    fileInfo = new FileInfo();
    fileInfo.readFields(blockIter.nextBlockWithBlockType(BlockType.FILE_INFO).getByteStream());
    lastKey = fileInfo.get(FileInfo.LASTKEY);
    avgKeyLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_KEY_LEN));
    avgValueLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_VALUE_LEN));
    byte [] keyValueFormatVersion =
View Full Code Here

Examples of org.apache.sling.ide.transport.FileInfo

        if (resource.isTeamPrivateMember(IResource.CHECK_ANCESTORS)) {
            Activator.getDefault().getPluginLogger().trace("Skipping team-private resource {0}", resource);
            return null;
        }

        FileInfo info = createFileInfo(resource);
        Activator.getDefault().getPluginLogger().trace("For {0} built fileInfo {1}", resource, info);

        File syncDirectoryAsFile = ProjectUtil.getSyncDirectoryFullPath(resource.getProject()).toFile();
        IFolder syncDirectory = ProjectUtil.getSyncDirectory(resource.getProject());

        Filter filter = ProjectUtil.loadFilter(resource.getProject());

        ResourceProxy resourceProxy = null;

        if (serializationManager.isSerializationFile(resource.getLocation().toOSString())) {
            InputStream contents = null;
            try {
                IFile file = (IFile) resource;
                contents = file.getContents();
                String resourceLocation = file.getFullPath().makeRelativeTo(syncDirectory.getFullPath())
                        .toPortableString();
                resourceProxy = serializationManager.readSerializationData(resourceLocation, contents);
                normaliseResourceChildren(file, resourceProxy, syncDirectory, repository);


                // TODO - not sure if this 100% correct, but we definitely should not refer to the FileInfo as the
                // .serialization file, since for nt:file/nt:resource nodes this will overwrite the file contents
                String primaryType = (String) resourceProxy.getProperties().get(Repository.JCR_PRIMARY_TYPE);
                if (Repository.NT_FILE.equals(primaryType)) {
                    // TODO move logic to serializationManager
                    File locationFile = new File(info.getLocation());
                    String locationFileParent = locationFile.getParent();
                    int endIndex = locationFileParent.length() - ".dir".length();
                    File actualFile = new File(locationFileParent.substring(0, endIndex));
                    String newLocation = actualFile.getAbsolutePath();
                    String newName = actualFile.getName();
                    String newRelativeLocation = actualFile.getAbsolutePath().substring(
                            syncDirectoryAsFile.getAbsolutePath().length());
                    info = new FileInfo(newLocation, newRelativeLocation, newName);

                    Activator.getDefault().getPluginLogger()
                            .trace("Adjusted original location from {0} to {1}", resourceLocation, newLocation);

                }
View Full Code Here

Examples of org.apache.sling.ide.transport.FileInfo

        IFolder syncFolder = project.getFolder(ProjectUtil.getSyncDirectoryValue(project));

        IPath relativePath = resource.getFullPath().makeRelativeTo(syncFolder.getFullPath());

        FileInfo info = new FileInfo(resource.getLocation().toOSString(), relativePath.toOSString(), resource.getName());

        Activator.getDefault().getPluginLogger().trace("For {0} built fileInfo {1}", resource, info);

        return info;
    }
View Full Code Here

Examples of org.apache.sling.ide.transport.FileInfo

                Activator
                        .getDefault()
                        .getPluginLogger()
                        .trace("Found covering resource data for resource at {0},  skipping deletion and performing an update instead",
                                resource.getFullPath());
                FileInfo info = createFileInfo(resource);
                return repository.newAddOrUpdateNodeCommand(info, coveringParentData);
            }
        }
       
        return repository.newDeleteNodeCommand(serializationManager.getRepositoryPath(resourceLocation));
View Full Code Here

Examples of org.araneaframework.uilib.support.FileInfo

      FileItem file = fileUpload.getUploadedFile(controlName);
      String mimeType = file.getContentType();

      if (permittedMimeFileTypes == null || permittedMimeFileTypes.contains(mimeType)) {

        innerData = new FileInfo(file);
      }
      else {
        addError(
            ErrorUtil.localizeAndFormat(
            UiLibMessages.FORBIDDEN_MIME_TYPE,
View Full Code Here

Examples of org.bladerunnerjs.model.FileInfo

    File themesDir = assetContainer.file("themes");
    if(!themesDir.exists()){
      return;
    }
   
    FileInfo themesDirInfo = brjs.getFileInfo(themesDir);
    for(File themeDir : themesDirInfo.dirs()) {
      String relativePath = RelativePathUtility.get(brjs.getFileInfoAccessor(), assetContainer.dir(), themeDir);
      assetLocationDirectories.add(relativePath);
    }
  }
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.