/** * Gets the {@link DirFieldMask} * * @return The {@link DirFieldMask}. If the mask is not specified, this method returns {@link * DirFieldMask.ALL}. */ public DirFieldMask dirFieldMask() { final Leaf node = findType(GlowTags.Command.DIRFIELD_MASK); if (node != null) { final int value = node.value().toInt(); return DirFieldMask.valueOf(value); } else { return DirFieldMask.ALL; } }
/** * Sets the {@link DirFieldMask} for this command. This property is only used by a request of type * {@link CommandType.GETDIRECTORY}. If this property is not set, the provider must handle the * command as if {@link DirFieldMask.DEFAULT} is set. * * @param mask The mask containing the properties to query. * @throws NullPointerException Thrown if {@link mask} is <i>null</i>. */ public void setDirFieldMask(DirFieldMask mask) throws NullPointerException { replace(new Leaf(GlowTags.Command.DIRFIELD_MASK, new Value(mask.value()))); }